Dear all,

I have a data frame which is like-

V1  V2               V3              V4
  9  2                 .,              a\
  9  2                .$,              a`
 13  1                  ,               a
 13  1                  ,               a
 13  1                  ,               a
 13  1                  ,               a
 13  1                  ,               `
 13  1                  ,               ^
 13  1                  ,               a
 13  1                 ,$               a

Column V4 contains ASCII values.I want to convert them into decimal.I am using-

df$V4=lapply(df[,4], function(c) as.numeric(charToRaw(c)))


I want to ask that,is this the right way to convert these values into decimal?

Thanking you,
Warm Regards
Vikas Bansal
Msc Bioinformatics
Kings College London
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to