> f1_split <- data.frame(do.call("rbind", strsplit(as.character(f1[, 1]), ";", fixed = TRUE))[, 1, drop = FALSE] + colnames(f1_split) <- "staxids_X" Error: unexpected symbol in: "f1_split <- data.frame(do.call("rbind", strsplit(as.character(f1[, 1]), ";", fixed = TRUE))[, 1, drop = FALSE] colnames" > 怎么回事
时间: 2024-03-03 07:49:56 浏览: 151
R语言综合实战案例R语言综合实战案例R语言综合实战案例R语言综合实战案例R语言综合实战案例.txt
这个错误是由于代码的第一行和第二行没有分号或者换行符分隔开导致的。您可以将代码修改为:
```
f1_split <- data.frame(do.call("rbind", strsplit(as.character(f1[, 1]), ";", fixed = TRUE))[, 1, drop = FALSE])
colnames(f1_split) <- "staxids_X"
```
这样就可以避免这个错误了。
阅读全文