简体   繁体   English

在Bluesky Statistics中如何将输出写入csv文件

[英]In Bluesky Statistics How do I write output to a csv file

I can't get write.csv or write.table to work in the r editor of BlueSky Statistics. 我无法使用write.csvwrite.table在BlueSky Statistics的r编辑器中工作。

I usually just use this format in RStudio and it works perfectly. 我通常只是在RStudio中使用这种格式,它运行得很好。

write.csv(df, "zzz.csv")

Any hints?" 任何提示?“

The default install location for BlueSky Statistics is 'C:\\Program Files', where by default, there is no write permission (for creating or deleting files). BlueSky Statistics的默认安装位置是“C:\\ Program Files”,默认情况下,没有写入权限(用于创建或删除文件)。 Also, saving a file in the install location is not safe, as the file may get lost/deleted when the application is uninstalled. 此外,在安装位置保存文件并不安全,因为卸载应用程序时文件可能会丢失/删除。 So it is always good to save your file(s) in your own folder(s) where you also have write permission. 因此,将文件保存在您自己的文件夹中也是一件好事,在这些文件夹中您也拥有写入权限。

In short, try to provide a writable location/path in write.csv() or other similar functions/commands. 简而言之,尝试在write.csv()或其他类似的函数/命令中提供可写的位置/路径。 See example below: 见下面的例子:

To save your file to the Desktop folder. 将文件保存到Desktop文件夹。

write.csv(df, "C:/Users/<YourUsername>/Desktop/zzz.csv")

Note: use forward slash(/) as a path separator. 注意:使用正斜杠(/)作为路径分隔符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM