I am using this code to calculate the means of different groups of values.
> means <- aggregate(jots.xpc.txt$Cfxtn32, by=list(jots.xpc.txt$Tx), mean)
> means
Group.1 x
1 C1_Mac 0.04957707
2 C1_MH 0.14721646
3 C2_Mac 0.01389217
4 C2_MH 0.03080142
5 X1_Mac 0.04871321
6 X1_MH 0.15913916
7 X2_Mac 0.07951835
8 X2_MH 0.08354484
9 XB1_Mac 0.05090939
10 XB1_MH 0.22035204
11 XB2_Mac 0.05053910
12 XB2_MH NA
But I want to exclude the NA from the data, so I used the na.rm=TRUE command.
> means <- aggregate(jots.xpc.txt$Cfxtn32, by=list(jots.xpc.txt$Tx), mean(na.rm=TRUE))
Error in mean.default(na.rm = TRUE) :
argument "x" is missing, with no default
Can someone tell me what I'm doing wrong?