数据示例:
lme1<- lme(total.fruits ~ rack + nutrient + amd + status,
random = ~1|reg, method = "ML", data=Arabidopsis)
Run Code Online (Sandbox Code Playgroud)
我如何知道保存下面 tab_model() 函数的输出?tab_model() 函数是 sjPlot 包的一部分。除了截图之外,他们必须采取其他方式,或者?
tab_model(lme1)
Run Code Online (Sandbox Code Playgroud)
Sim*_*one 10
你可以写以下内容:
library(sjPlot)
tab_model(lme1, file = "YOURTABLENAME.doc")
Run Code Online (Sandbox Code Playgroud)
#lme1 可以是任何型号
你可以使用webshot
包:
使用file
选项首先保存 .html 文件
然后使用webshot制作.png文件
请参阅我的 mtcars 示例:
library(nlme)
library(sjPlot)
library(webshot)
lme1<- lme(mpg ~ cyl + disp + hp,
random = ~1|disp, method = "ML", data=mtcars)
# first save table to html file
tab_model(lme1, file = "plot.html")
# then take this html file and make .png file
webshot("plot.html", "plot.png")
Run Code Online (Sandbox Code Playgroud)