分配行名时出现“在第1级没有这样的索引”错误

时间:2019-02-28 11:30:40

标签: r

我是R的初学者,一直遇到这个问题。我需要帮助来了解究竟是什么错误以及正确的编码方式。

R <- c("A", "B", "C", "D", "E", "F", "G", "H")
C <- c("1", "2", "3", "4", "5", "6")
rownames(a) <- R
colnames(a) <- C
a <- read.table("/Users/apple/Desktop/R/datasample.txt", header = FALSE, sep = "", quote = "\"'", dec = ".", as.is = FALSE, na.strings = "NA", colClasses = NA, nrows = 8, skip = 0, check.names = TRUE, fill = TRUE, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = "#", match.arg(rownames(a), several.ok = TRUE), rownames(a) <- R)
  

formal.args [[as.character(substitute(arg))]]中的错误:         1级没有这样的索引

0 个答案:

没有答案