我有几个线性模型结果要放入一个大的xtable中
library(ggplot2)
library(xtable)
modl1 <- xtable(lm(depth ~ price, diamonds))
modl2 <- xtable(lm(carat ~ price, diamonds))
modl3 <- xtable(lm(carat ~ depth, diamonds))
big_table <- read.csv(text= paste0("model, exampleA, exampleB
P,",modl1,",",modl2,"
Q,",modl3,",NA"))
xtable(big_table)
给出可以理解的错误:
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
more columns than column names