1、控制台中的工作概述The RStudio console includes a variety of features intended to make working with R more productive andstraightforward. This article reviews these features. Learning to use these features along with the related featuresavailable in the Source and History panes can have a substantial
2、payoff in your overall productivity with R.RStudio 控制台包含许多使 R 工作更为有效和直观的特征。本文综述这些特征。学习使用这些特征以及 Source 和 History 窗口中可用的相关特征可以对你使用 R 的效率有实际性的帮助。代码补全RStudio supports the automatic completion of code using thekey. For example, if you have an object namedpollResults in your workspace you can type
3、 poll and thenand RStudio will automatically completethe 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 typedsub then p
4、ressedyou would see:代码补全特征同样提供了尽可能的嵌入式帮助。例如,如果你可输入 sub 然后按键,你将看到:Code completion also works for function arguments, so if you typed subset( and then pressedyou'd seethe following:代码补全还可以对参数功能进行工作,如果你可输入 subset(然后按键,你将看到:检索以前命令As you work with R you'll often want to re-execute a command which
5、 you previously entered. As with the standardR 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 wis
6、h to review a list of your recent commands and then select a command from this list you can useto 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
7、 a given prefix. Forexample, 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 Co