楼主: 拂去尘缘
4853 6

[实际应用] Rstudio保存script文件出现如下选项怎么办 [推广有奖]

  • 0关注
  • 3粉丝

已卖:492份资源

副教授

65%

还不是VIP/贵宾

-

威望
0
论坛币
8949 个
通用积分
78.4484
学术水平
1 点
热心指数
2 点
信用等级
1 点
经验
14147 点
帖子
387
精华
0
在线时间
1213 小时
注册时间
2016-4-16
最后登录
2025-12-23

楼主
拂去尘缘 发表于 2017-10-17 09:35:12 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
如图,Rstudio保存script文件出现如下选项是什么意思?有什么区别?有没有相关资料介绍?
谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:RStudio Studio script scrip scri

1508203629(1).png (9.39 KB)

1508203629(1).png

沙发
AlexYoung757 在职认证  学生认证  发表于 2017-10-17 09:42:16
这个就是要设置文件编码格式
已有 1 人评分热心指数 收起 理由
啊啊啊啊啊吖 + 5 精彩帖子

总评分: 热心指数 + 5   查看全部评分

藤椅
crystal8832 学生认证  发表于 2017-10-17 09:48:47
UTF-8,然后选择set as default 就行了
已有 1 人评分热心指数 收起 理由
啊啊啊啊啊吖 + 5 精彩帖子

总评分: 热心指数 + 5   查看全部评分

板凳
拂去尘缘 发表于 2017-10-17 13:40:39
AlexYoung757 发表于 2017-10-17 09:42
这个就是要设置文件编码格式
您好,非常感谢您的回答。您知道这几种编码格式有什么区别吗?

报纸
拂去尘缘 发表于 2017-10-17 13:41:11
crystal8832 发表于 2017-10-17 09:48
UTF-8,然后选择set as default 就行了
恩恩,好。多谢。您知道这几种编码格式有什么区别吗?

地板
crystal8832 学生认证  发表于 2017-10-17 15:43:44
拂去尘缘 发表于 2017-10-17 13:41
恩恩,好。多谢。您知道这几种编码格式有什么区别吗?
Starting with version 0.93, RStudio supports non-ASCII characters for input and output.

Console

Unicode characters can be used for both input and output in the console.

Source Editor

The RStudio source editor natively supports Unicode characters. It will allow you to type or paste characters from any language, even ones that are not part of the document's character set. RStudio will allow you to save such documents, but will print a warning to the R console that not all characters could be encoded. If you close the document without re-saving in a more suitable encoding, those characters will be lost.

If in doubt about which encoding to use, use UTF-8, as it can encode any Unicode character.

Reading and Writing Files

The RStudio source editor can read and write files using any character encoding that is available on your system:

You can choose the encoding for reading with File : Reopen with Encoding, which will re-read the current file from disk with the new encoding.
You can also save an open file using a different encoding with File : Save with Encoding.
The Reopen and Save with Encoding commands both display the following dialog:



Setting the Default Encoding

If you frequently use the character set, check "Set as default encoding for source files". You can view or change this default in the Tools : Options (for Windows & Linux) or Preferences (for Mac) dialog, in the General section.

If you don't set a default encoding, files will be opened using UTF-8 (on Mac desktop, Linux desktop, and server) or the system's default encoding (on Windows). When saving a previously unsaved file, RStudio will ask you to choose an encoding if non-ASCII characters are present.

Known Issues

If you call Sys.setlocale with "LC_CTYPE" or "LC_ALL" to change the system locale while RStudio is running, you may run into some minor issues as RStudio assumes the system encoding doesn't change. If you are on Windows, we recommend you only call Sys.setlocale in .Rprofile. If you are on Mac or Linux and want to change the system locale, please visit the support forum and let us know your scenario.
On Windows, R's source function does not work with files that include characters that aren't part of the current system encoding. You may have trouble with RStudio's Run All and Source on Save commands, as they rely on source.

7
拂去尘缘 发表于 2017-10-18 07:39:28
crystal8832 发表于 2017-10-17 15:43
Starting with version 0.93, RStudio supports non-ASCII characters for input and output.

Console ...
[em17][em17]

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 11:44