[R] covert entire dataset to numeric while persuing percentage values
JS Huang
js.huang at protective.com
Thu Feb 26 15:19:57 CET 2015
The following data.frame x as one column named Percent.
> x
Percent
1 10%
2 20%
3 30%
> as.numeric(substr(x$Percent,1,nchar(x$Percent)-1))
[1] 10 20 30
--
View this message in context: http://r.789695.n4.nabble.com/covert-entire-dataset-to-numeric-while-persuing-percentage-values-tp4703862p4703880.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list