Dear Jake,
An easy way to find the value of one variable by different levels of
another is using by(). For example, turning to the good old mtcars
data again:
> by(mtcars$mpg, factor(mtcars$cyl), mean)
factor(mtcars$cyl): 4
[1] 26.66364
---
dear list,
is there any function in R with which i can compute subject-wise means for a
single factor level? for instance, i wanna have the mean for each subject
for the first level of factor A, how can i get that? is there a
straightforward way to solve this problem?
kind regards
jake
2 matches
Mail list logo