Thanks for attention. I am reading the manual of R to work inside the
dataframe. I write this code to subtract the value 2 at the column x
values
I import the data, see the structures of my data frame
> str(Soil_pollution)
'data.frame': 912 obs. of 2 variables:
$ ID: Factor w/ 912 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ...
$ x : num 22.8 23 53.5 39.7 27.5 ...
# subtract index = 2 at all values
indexcorrect_Soil_pollution <- Soil_pollution[Soil_pollution$x - 2
,c("ID","x")]
> str(indexcorrect_Soil_pollution)
'data.frame': 912 obs. of 2 variables:
$ ID: Factor w/ 912 levels "1","2","3","4",..: 20 21 51 37 25 45 37 24 36
39 ...
$ x : num 25.8 45 24.1 54.8 41.9 ...
there is a modification of the data frame but sorry I don't understand where
is the problem in the code. I spent all my afternoon to read. Sorry if I
sent this email
Gianni
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo