在 R 中使用 xlsx 包

Using the xlsx package in R

我正在尝试将数据 table 从 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)

但它从来不让我输入命令,它一直把我推到一个新的行。

有人能给我一些指导吗?

刚在我的 R 控制台上试过运行。
这是因为在 R 中,逻辑 FALSE 应该大写或直接称为 F.
对于 write.xlsx(x, file = "myfile.xlsx", sheetName = "Sheet1", append = False),它认为 False 是一个预定义变量。
尝试 write.xlsx(x, file = "myfile.xlsx", sheetName = "Sheet1", append = FALSE)。它对我有用。