I want to calculate mean of a column in R. The column is written in a csv file, namely datafile, as follows.
X
12
14
10
...
I read the data as follows.
myData <- read.csv("datafile.csv")
When I want to calculate the mean as mean(myData)
, I get the following message:
[1] NA Warning message: In mean.default(myData) : argument is not numeric or logical: returning NA