I have a data frame (process.yield):
process Yield 35 0.38 37 0.29 89 0.75 90 0.82
I want R to calculate the mean of values in column 2 ("Yield"). This seems trivial, but somehow after applying functions like apply, aggregate, mean, by, I have not been able to get the right results. I'm guessing there is a problem with my data frame.
Example: Aggregate function:
process.yield.mean <- aggregate(process.yield, by=list(process.yield$Yield), FUN=mean)
Error from aggregate function:
1: In mean.default(X[[1L]], ...) : argument is not numeric or logical: returning NA etc etc
Can anyone help please?