If you have Sites with "ALA1", "ALA2", etc
it would be better to do:
lst1<- split(WrackMass,substr(WrackMass$Site.X.Treatment,1,4))
res1<-lapply(lst1,function(x) do.call(cbind,lapply(x[,1:4],function(y) {Site<-
gsub(".*\\d(.*)","\\1",x$Site.X.Treatment);t.test(y[Site=="A"],y[Site=="U"],pair
Hi,
Still no data.
>From your code, it looks like data is similar to this:
set.seed(25)
WrackMass<-
data.frame(Algae.Mass=sample(40:50,30,replace=TRUE),Seagrass.Mass=sample(30:70,30,replace=TRUE),Terrestrial.Mass=sample(80:100,30,replace=TRUE),Other.Mass=sample(40:60,30,replace=TRUE),Site.X.Tre
My code was based on the assumption that your dataset was similar to the one I
provided. Please provide an example dataset (use dput(head(dataset),20))
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
A.K.
>Arun,
>
>I have tried applying your suggestions t
Hi,
Assuming that your dataset is similar to the one below:
set.seed(25)
dat1<-
data.frame(Algae.Mass=sample(40:50,10,replace=TRUE),Seagrass.Mass=sample(30:70,10,replace=TRUE),Terrestrial.Mass=sample(80:100,10,replace=TRUE),Other.Mass=sample(40:60,10,replace=TRUE),Site.X.Treatment=rep(c("ALA1A","A
4 matches
Mail list logo