Dear StackOverflow Users,
R treating a particular data sets as non-numeric, a fairly normal problem:
df
trial count
1 0.75
2 .
3 0.90
4 0.80
So I removed the . trials with the subset command:
df <- subset(df, count != '.')
Which provides the following output:
trial count
1 0.75
3 0.90
4 0.80
I want to calculate the mean average of count so I do the following,
mean(as.numeric(df$count))
But for some reason instead of getting mean of all the values (.816), I get the mean of the rank order values (2).
I have never come across this problem, and though I can think of plenty of work arounds, I was wondering if anyone knew why this was happening?
Thank you for your time and consideration,
BC