我正在尝试将数据表从R导出到excel中。我安装了xlsx包,它给了我以下输出:
Installing package into ‘C:/Users/Jack/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL
'https://mirrors.sorengard.com/cran/bin/windows/contrib/3.4/xlsx_0.5.7.zip'
Content type 'application/zip' length 401236 bytes (391 KB)
downloaded 391 KB
package ‘xlsx’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Jack\AppData\Local\Temp\Rtmp04FZrB\downloaded_packages
然后当我用library("xlsx")
加载时,它说:
Loading required package: rJava
Loading required package: xlsxjars
然后我尝试了这一行:
write.xlsx(x,file="myfile.xlsx",sheetName="Sheet1",append=False)
但它永远不会让我输入命令,它一直把我推到一条新线上。
有人可以就错误给我一些指导吗?
答案 0 :(得分:1)
刚尝试在我的R控制台上运行它。
这是因为在R中,逻辑model.config
应该大写或仅称为FALSE
对于F
,它认为write.xlsx(x, file = "myfile.xlsx", sheetName = "Sheet1", append = False)
是预定义的变量
试试False
。它对我有用。