[英]Importing excel with merged cells in R
I have a data set whose first column is merged with 4 columns in excel. 我有一个数据集,其第一列与excel中的4列合并。 When I import the same in R only this column gets imported while the others don't. 当我在R中导入相同的列时,仅此列被导入,而其他列则不被导入。 Could you please suggest me how to import the data correctly. 您能否建议我如何正确导入数据。
Try with: 尝试:
data = read.csv("FILE_NAME.csv", header=TRUE, stringsAsFactors=FALSE, sep = "\\t")
it should work. 它应该工作。 And to delete the first rows, then it is easier this way: 并删除第一行,则这种方式会更容易:
data[,firstROWnumberTOdelete:secondROWnumberTOdelete] <- NULL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.