Dear all,
I have a two text files contain gene names and methylation degree. I have read these files with scan command in R and named them data1 and data2. Gene names and methylation degree have character and numeric type, respectively . when i combine them in one data frame with below command, it does not work correctly. All of them changes to a data frame with string type with number view and does not preserve their types.
df=data.frame(data1, data2)
There's rarely a reason to use
scan
for such things, that's whatread.delim()
and such are for.Please post a couple lines from data1 and data2 (or better yet, the original files before you read them in).
1.) This is not a bioinformatics question.
2.) read the helps: