数値からカンマを取り除く関数 decomma{eeptools}

Reference – https://twitter.com/Rbloggers/status/646539588819783680
> library(eeptools)
> dataset
  x      y
1 1 1,000 
2 2 2,000 
3 3 3,000 
4 4 4,000 
5 5 5,000 
6 6 6,000 

> class(dataset)
[1] "data.frame"

> class(dataset[,2])
[1] "character"

> tmp<-apply(dataset,2,decomma)
> tmp
     x    y
[1,] 1 1000
[2,] 2 2000
[3,] 3 3000
[4,] 4 4000
[5,] 5 5000
[6,] 6 6000

> class(tmp)
[1] "matrix"

> class(tmp[,2])
[1] "numeric"

> dataset<-as.data.frame(tmp)
> dataset
  x    y
1 1 1000
2 2 2000
3 3 3000
4 4 4000
5 5 5000
6 6 6000

> class(dataset)
[1] "data.frame"

> class(dataset[,2])
[1] "numeric"