没有合适的资源?快使用搜索试试~ 我知道了~
首页RStudio中文学习手册
资源详情
资源评论
资源推荐
控制台中的工作
概述
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 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 pressed you would see:
代码补全特征同样提供了尽可能的嵌入式帮助。例如,如果你可输入 sub 然后按
键,你将看到:
Code completion also works for function arguments, so if you typed subset( and then pressed you'd see
the following:
代码补全还可以对参数功能进行工作,如果你可输入 subset(然后按 键,你将看
到:
检索以前命令
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)
— Reverse of Up
—回忆前一条命令;
—回 相反;
If you wish to review a list of your recent commands and then select a command from this list you can use
to review the list (note that on the Mac you can also use ):
如果你希望回顾你当前的命令列表并从中选择一条命令,则可使用 来回顾命令列
表(注意:在 Mac 你还可使用 )
You can 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 :
你还可以使用同样的快捷键来快速查找匹配给定前缀的命令。例如,查找前面出现过的
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 useful 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
represents 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 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 编辑器执行命令相对于控制台来说更便于复
制命令序列和将其做为再次使用的函数进行打包;这些特征将在后面的执行代码部分讲解。
文件管理
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 menu: 你可通过 菜单创建新文件。(你也
可使用 快捷键)。
剩余45页未读,继续阅读
qq_42307845
- 粉丝: 3
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1