Hi all,
i'm trying to run a two-sample t-test.
i have a longitudinal data that looks like this:
idn    age    class
1       22       1
1       22       1
1       22       1
1       22       1
2       63       3
2       63       3
2       63       3
3       43       2
3       43       2
3       43       2
3       43       2
3       43       2
3       43       2
4       37       1
4       37       1
4       37       1
.
.
.
i want to compare between class 1 and 3, to see if there are any age
differences, and want to count every id once (not all id numbers have the
same number of rows).
i tried:

with(

subset(x1, !duplicated(idn)),

t.test(age[class=="1"],age[hidclass=="3"]

)

but it didn't work. any suggestions?

thank you,

sigalit.

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to