Displaying 2 results from an estimated 2 matches for "tt4721187".
2017 Oct 11
6
changing "," to "." in data.frame
Dear friends - I have a data.frame with "," instead of "." and found the
discussion
http://r.789695.n4.nabble.com/How-to-replace-all-commas-with-semicolon-in-a-string-tt4721187.html#a4721192
so copying the code of Ulrik(I hope:-)) I tried
(making some data)
AX <-
data.frame(a=chartr(".",",",rnorm(5)),b=chartr(".",",",rnorm(5)),c=rnorm(5))
library(plyr)
adply(AX, 2, function(x){
if(!is.numeric(x[[1]]){
gsub(",",...
2017 Oct 11
0
changing "," to "." in data.frame
...oject.org
> Subject: [R] changing "," to "." in data.frame
>
> Dear friends - I have a data.frame with "," instead of "." and found the
> discussion
>
> http://r.789695.n4.nabble.com/How-to-replace-all-commas-with-semicolon-in-
> a-string-tt4721187.html#a4721192
>
> so copying the code of Ulrik(I hope:-)) I tried
>
> (making some data)
>
> AX <-
> data.frame(a=chartr(".",",",rnorm(5)),b=chartr(".",",",rnorm(5)),c=rnorm(5))
>
>
> library(plyr)
>
> adply(AX, 2, funct...