[R] Multiple Paired T test from large Data Set with multiple pairs
smartpink111 at yahoo.com
Thu May 2 19:58:10 CEST 2013
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))
>I have tried applying your suggestions to my data set but I
cannot get it to work. I think my lack of R skills may be a
contributing factor. I will keep >trying though.
----- Original Message -----
From: arun <smartpink111 at yahoo.com>
To: R help <r-help at r-project.org>
Sent: Wednesday, May 1, 2013 5:43 PM
Subject: Re: Multiple Paired T test from large Data Set with multiple pairs
Assuming that your dataset is similar to the one below:
# Algae.Mass Seagrass.Mass Terrestrial.Mass Other.Mass
# 1.0000000 0.4624989 0.4388211 0.7521036
# variable Pvalue
#1 Algae.Mass 1.0000000
#2 Seagrass.Mass 0.4624989
#3 Terrestrial.Mass 0.4388211
#4 Other.Mass 0.7521036
>I have a fairly large data set with multiple pairs of Sites.
Each site has two levels (the pairs) "A" and "U". For each pair I want
to do a paired t test of >4 different metrics that exist as columns in
my data set.
>Here is the long version
>How can I do this in one line of code? I have tried lapply,
tapply etc but keep running into issues. It would also be great to not
have to keep defining >"Site.X.Treatment". I do have Site.X.Treatment
broken down by just Site and Treatment in separate columns in the data
set. Any Ideas??
More information about the R-help