Searching for an answer about the error I encountered when trying to parse data in R, I found a case very similar, but not identical to what I came across. So I decided to write my question in a systematized way.
ROUTINE in R:
# pr é o nome do arquivo de dados, em .txt
> str(pr)
'data.frame': 280 obs. of 11 variables:
$ Trat : Factor w/ 17 levels "ta","tb","tb ",..: 1 1 1 1 1 3 2 3 3 2 ...
$ Colocm: Factor w/ 159 levels "0.168","0.173",..: 158 53 34 57 38 53 13 2 8 24 ...
$ Compcm: Factor w/ 73 levels "10","10.1","10.2",..: 73 30 29 38 42 30 31 36 26 35 ...
$ NF : int 7 4 7 2 11 4 6 5 4 7 ...
$ CRcm : Factor w/ 99 levels "10","10.2","10.5",..: 39 56 45 68 59 55 78 82 73 57 ...
$ MFR : Factor w/ 205 levels "1.34","1.57",..: 153 32 15 54 177 32 126 22 80 85 ...
$ MFCg : Factor w/ 52 levels "0.13","0.14",..: 29 1 1 27 16 1 18 6 1 9 ...
$ MFFg : Factor w/ 98 levels "0.0436","0.12",..: 83 28 47 11 58 28 54 21 40 27 ...
$ MSRg : Factor w/ 117 levels "0.3","0.32","0.34",..: 108 18 47 107 87 51 88 23 58 62 ...
$ MSCg : Factor w/ 178 levels "0.00854","0.00986",..: 169 11 131 84 14 12 102 19 9 31 ...
$ MSFg : Factor w/ 102 levels "0.0086","0.01206",..: 95 73 52 80 59 69 80 59 78 64 ...
PROBLEM: When trying to examine the average of the "Colocm" variable, I come across the problem below.
mean (pr $ Colocm) # arithmetic mean of the colon [1] NA Warning message: In mean.default (pr $ Colocm): argument is neither numeric nor logical: returning NA
COMMENT: Because there are ten variables and I need to do the exploratory analysis of them, I need to understand where I'm going wrong.
I am interested in adopting R as a tool for analyzing experimental data, especially in the agronomic area, but the lack of experience in the use of R has taken a lot of time with the many errors that arise when trying to use this tool for data analysis .