★RStudio学习手册(中文翻译)

更新时间:2023-06-16 16:29:33 阅读: 评论:0

控制台中的工作
概述
The RStudio console includes a variety of features intended to make working with R more productive and straightforward. This article reviews the features. Learning to u the features along with the related features available in the Source and History panes can have a substantial payoff in your overall productivity with R.
RStudio控制台包含许多使R工作更为有效和直观的特征。本文综述这些特征。学习使用这些特征以及Source和History窗口中可用的相关特征可以对你使用R的效率有实际性的帮助。
代码补全
李欣儿
RStudio supports the automatic completion of code using the  key. For example, if you have an object named pollResults in your workspace you can type poll and then  and RStudio will automatically complete
the full name of the object.
RStudio支持使用键来自动补全代码。例如,如果你在工作空间中有名为pollResults的对象,你可输入poll然后按键,RStudio将自动完成该对象的全名。
肉的简笔画The code completion feature also provides inline help for functions whenever possible. For example, if you typed sub then presd  you would e:
代码补全特征同样提供了尽可能的嵌入式帮助。例如,如果你可输入sub然后按
自学书法键,你将看到:
Code completion also works for function arguments, so if you typed subt( and then presd  you'd e the following:
自查报告怎么写代码补全还可以对参数功能进行工作,如果你可输入subt(然后按键,你将看到:
检索以前命令
小馄饨的包法As you work with R you'll 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控制台支持使用以下方向键回忆之前命令的功能:
∙— Recall previous command(s)几鸡
∙— Rever of Up
∙—回忆前一条命令;
∙—回相反;
If you wish to review a list of your recent commands and then lect a command from this list you can u
to review the list (note that on the Mac you can also u ):
如果你希望回顾你当前的命令列表并从中选择一条命令,则可使用来回顾命令列表(注意:在Mac你还可使用)
You can also u this same keyboard shortcut to quickly arch for commands that match a given prefix. For example, to arch for previous instances of the plot function simply type plot and then :
你还可以使用同样的快捷键来快速查找匹配给定前缀的命令。例如,查找前面出现过的plot函数,先输入plot然后
控制台标题栏
This screenshot illustrates 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 double-clicking the title bar).
中医神探∙显示当前工作目录;
∙能够在一个长期的计算里中断R;
∙最小化和最大化Console和Source窗口(使用右上按钮或双击标题栏)
快捷键
Beyond the history and code-completion oriented keyboard shortcuts described above, there are a wide variety of other shortcuts available. Some of the more uful shortcuts include:
除了上述的历史和代码补全快捷键外,还有很多其他快捷键可用,其中最为有用的快捷键包括
∙— Move focus to the Source Editor
∙— Move focus to the Console
∙— Clear the Console
∙— Interrupt R
∙—移动焦点到Source编辑器。
∙—移动焦点到Console。
∙—清理控制台;
∙—中断R
You can find a list of all shortcuts in the Keyboard Shortcuts article.
你可从Keyboard Shortcuts文中找到所有快捷键列表。
相关主题
∙Editing and Executing Code编辑和执行代码
∙Using Command History使用命令历史
编辑执行代码
概述
RStudio's source editor includes a variety of productivity enhancing features including syntax highlighting, code completion, multiple-file editing, and find/replace.
RStudio的souce编辑器包含各种提高效率的特征,包括语法高亮显示,代码自动补全,多文件编辑以及查找和替换。
RStudio also enables you to flexibly execute R code directly from the source editor. For many R developers this reprents their preferred way of working with R. By executing commands from within the source editor rather than the console it is much easier to reproduce quences of commands as well as package them for re-u as a function. The features are described in the Executing Code ction below.
RStudio还可以使你直接通过source编辑器灵活地执行R代码。对于许多R开发者来说,这是他们使用R的首选方式。通过source编辑器执行命令相对于控制台来说更便于复制命令序列和将其做为再次使
用的函数进行打包;这些特征将在后面的执行代码部分讲解。
文件管理
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 u the  menu: 你可通过菜单创建新文件。(你也
可使用快捷键)。

本文发布于:2023-06-16 16:29:33,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1041298.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:命令   使用   代码
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图