大智慧龙软DTSR语言量化投资云培训RStudio学习手册中文翻译模板.docx
《大智慧龙软DTSR语言量化投资云培训RStudio学习手册中文翻译模板.docx》由会员分享,可在线阅读,更多相关《大智慧龙软DTSR语言量化投资云培训RStudio学习手册中文翻译模板.docx(55页珍藏版)》请在咨信网上搜索。
1、Working in the Console 控制台中工作Overview 概述The RStudio console includes a variety of features intended to make working with R more productive and straightforward. This article reviews these features. Learning to use these features along with the related features available in the Source and History pane
2、s can have a substantial payoff in your overall productivity with R. RStudio控制台包含很多使R工作更为有效和直观特征。本文综述这些特征。学习使用这些特征和Source和History窗口中可用相关特征能够对你使用R效率有实际性帮助。Code Completion 代码补全RStudio supports the automatic completion of code using the Tab key. For example, if you have an object named pollResults in y
3、our workspace you can type poll and then Tab and RStudio will automatically complete the full name of the object.RStudio支持使用Tab键来自动补全代码。比如,假如你在工作空间中有名为pollResults对象,你可输入poll然后按Tab键,RStudio将自动完成该对象全名。The code completion feature also provides inline help for functions whenever possible. For example, i
4、f you typed sub then pressed Tab you would see:代码补全特征一样提供了尽可能嵌入式帮助。比如,假如你可输入sub然后按Tab键,你将看到:Code completion also works for function arguments, so if you typed subset( and then pressed Tab youd see the following:代码补全还能够对参数功效进行工作,假如你可输入subset(然后按Tab键,你将看到:Retrieving Previous Commands 检索以前命令As you work
5、 with R youll often want to re-execute a command which you previously entered. As with the standard R console, the RStudio console supports the ability to recall previous commands using the arrow keys:当你使用R进行工作,你将常常可输入重新实施你之前输入命令。和标准R控制台一样,RStudio控制台支持使用以下方向键回想之前命令功效: Up Recall previous command(s) D
6、own Reverse of Up Up 回想前一条命令; Down 回Up相反;If you wish to review a list of your recent commands and then select a command from this list you can use Ctrl+Up to review the list (note that on the Mac you can also use Command-Up): 假如你期望回顾你目前命令列表并从中选择一条命令,则可使用Ctrl+Up往返顾命令列表(注意:在Mac你还可使用Command-Up)You can
7、also use this same keyboard shortcut to quickly search for commands that match a given prefix. For example, to search for previous instances of the plot function simply type plot and then Ctrl+Up:你还能够使用一样快捷键来快速查找匹配给定前缀命令。比如,查找前面出现过plot函数,先输入plot然后Ctrl+UpConsole Title Bar 控制台标题栏This screenshot illust
8、rates a few additional capabilities provided by the Console title bar:这个截屏说明了控制台标题栏部分额外功效。 Display of the current working directory. The ability to interrupt R during a long computation. Minimizing and maximizing the Console in relation to the Source pane (using the buttons at the top-right or by do
9、uble-clicking the title bar). 显示目前工作目录; 能够在一个长久计算里中止R; 最小化和最大化Console和Source窗口(使用右上按钮或双击标题栏)Keyboard Shortcuts 快捷键Beyond the history and code-completion oriented keyboard shortcuts described above, there are a wide variety of other shortcuts available. Some of the more useful shortcuts include: 除了上述
10、历史和代码补全快捷键外,还有很多其它快捷键可用,其中最为有用快捷键包含 Ctrl+1 Move focus to the Source Editor Ctrl+2 Move focus to the Console Ctrl+L Clear the Console Esc Interrupt R Ctrl+1 移动焦点到Source编辑器。 Ctrl+2 移动焦点到Console。 Ctrl+L 清理控制台; Esc 中止RYou can find a list of all shortcuts in the Keyboard Shortcuts article. 你可从Keyboard Sh
11、ortcuts文中找到全部快捷键列表。Related Topics 相关专题 Editing and Executing Code 编辑和实施代码 Using Command History 使用命令历史Editing and Executing Code 编辑实施代码Overview 概述RStudios source editor includes a variety of productivity enhancing features including syntax highlighting, code completion, multiple-file editing, and fi
12、nd/replace.RStudiosouce编辑器包含多种提升效率特征,包含语法高亮显示,代码自动补全,多文件编辑和查找和替换。RStudio also enables you to flexibly execute R code directly from the source editor. For many R developers this represents their preferred way of working with R. By executing commands from within the source editor rather than the conso
13、le it is much easier to reproduce sequences of commands as well as package them for re-use as a function. These features are described in the Executing Code section below.RStudio还能够使你直接经过source编辑器灵活地实施R代码。对于很多R开发者来说,这是她们使用R首选方法。经过source编辑器实施命令相对于控制台来说更便于复制命令序列和将其做为再次使用函数进行打包;这些特征将在后面实施代码部分讲解。Managin
14、g Files 文件管理RStudio supports syntax highlighting and other specialized code-editing features for the following types of files:Rstudio支持语法高亮显示和其它专业化代码编辑功效,针对以下类型文件。 R scripts R脚本文件 Sweave documents Sweave文件 TeX documents Tex文件To create a new file you use the File - New menu: 你可经过File - New菜单创建新文件。(你也
15、可使用Ctrl+Shift+N快捷键)。To open an existing file you use either the File - Open menu or the Open Recent menu to select from recently opened files. 你可经过File - Open菜单或Open Recent菜单选择来打开已经有文件。(你也可使用Ctrl+O快捷键)。If you open several files within RStudio they are all available as tabs to facilitate quick switch
16、ing between open documents. If you have a large number of open documents you can also navigate between them using the icon on the tab bar or the View - Switch to Tab) menu item:假如你经过RStudio打开很多文件,那么她们全部能够经过标签进行快速切换。假如你有大量打开文件,你也可在它们间经过标签栏中图标来进行导航,或View - Switch to Tab菜单项(你也可使用Ctrl+O快捷键)。Code Complet
17、ion 代码补全RStudio supports the automatic completion of code using the Tab key. For example, if you have an object named pollResults in your workspace you can type poll and then Tab and RStudio will automatically complete the full name of the object.RStudio能够使用Tab键来支持代码自动补全,比如,假如你在工作空间中有名为pollResults对象
18、,你可输入poll然后按Tab键,RStudio将自动完成该对象全名。Code completion also works in the console, and more details on using it can be found the console Code Completion documentation. 代码补全一样在控制台中工作,具体使用方法可间控制台代码自动完成Code Completion文档。Find and Replace 查找和替换RStudio supports finding and replacing text within source document
19、s: Rstudio支持在source文件中查找和替换。Find and replace can be opened using the Ctrl+F shortcut key, or from the Edit - Find and Replace menu item.可使用Ctrl+F快捷键来打开查找和替换栏,或使用Edit - Find and Replace菜单项。Extract Function 提取函数RStudio can analyze a selection of code from within the source editor and automatically con
20、vert it into a re-usable function. Any free variables within the selection (objects that are referenced but not created within the selection) are converted into function arguments:RStudio能够在source编辑器中分析一组选择代码,并自动将其转化成再次使用函数。任何选择中free变量(选择引用对象但不创建)将转化为函数参数。(你也可使用Ctrl+Shift+U快捷键)。Comment/Uncomment 注释/
21、取消注释You can comment and uncomment entire selections of code using the Edit - Comment/Uncomment Lines menu item (you can also do this using the Ctrl+/ keyboard shortcut):你可使用使用Edit - Comment/Uncomment Lines菜单项来对所选整个代码进行注释或取消注释(你也可使用Ctrl+Shift+C快捷键)。Indentation 首行缩进As you write R code in RStudio it is
22、 automatically indented according to the current indentation options (see Customizing RStudio). R code is also re-indented: 假如你在RStudio中写R代码,她将自动依据目前缩进选项(见Customizing RStudio)进行缩进。R代码也可再缩进。1. Whenever new code is pasted into a source document. 2. When the Reindent Lines command (pictured above) is i
23、nvoked. 当新代码黏贴到一个source文件中;当缩进行命令(上图)被调用Note that RStudio automatic indentation is R syntax-aware and is therefore only used on source files containing R code.注意:RStudio自动缩进针正确是R语法意识,所以,只有在包含R代码source文件中使用Executing Code 实施代码RStudio supports the direct execution of code from within the source editor
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 智慧 DTSR 语言 量化 投资 培训 RStudio 学习 手册 中文翻译 模板
1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【精****】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时私信或留言给本站上传会员【精****】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。