Panes in r programming
The main window of R Studio consists of several parts. Each part is called
a pane and performs different functions. These panes are well designed for data
analysts to work with data.
1. The console: The console works exactly like a Command Prompt or
terminal. In fact, when you type in a command at the console, RStudio
2. The editor: For longer chunks of code and function authoring, it’s more
convenient to first write your commands in an editor and execute them
in the console. There is a built-in R code editor for this purpose. The R
scripts you write in the code editor are essentially just plain-text files with
a .R extension. The editor is useful for editing R scripts, markdown docu-
ments, web pages, many types of configuration files, and even C++ source
[Link] specifically, when editing R scripts you can use the following
shortcut keys:
Press Ctrl + Enter to execute the selected lines.
Press Ctrl + Shift + S to source the current document, that is, to
evaluate all the expressions sequentially in the current document.
Press Tab or Ctrl + Space to show an autocompletion list of vari-
ables and functions that match your current typing.
3. The Environment pane: The Environment pane shows the variables
and functions that you have created and are available for repeated use. By
default, it shows the variables in the global environment, that is, the user
workspace in which you are working.
Each time you create a new object (a variable or function), a new
entry will appear in the Environment pane. The entry shows the variable
name and a short description of its value. When you change the value of a
symbol or even remove that symbol, you actually modify the environment
so that the environment pane reflects your change.
4. The History pane: The History pane shows the previous expressions
evaluated in the console. You can repeat the task performed previously by
simply pressing up in the console.
5. The File pane: The File pane shows the files in the folder. You can
navigate between folders, create new folders, delete or rename folders or
files, and so on.
6. The Plots pane: The Plots pane is used to show graphics produced by R
code. If you produce more than one plot, the previous ones are stored and
you can navigate back and forth to view all plots (until you clear them).
You can also export a plot to a file for future use.
1.5. PACKAGES 13
7. The Packages pane: The Packages pane shows all installed packages.
You can also easily install or update packages from CRAN or remove an
existing package from your library.
8. The Help pane: The Help pane shows the documentation so that you
can easily learn how to use [Link] are numerous ways to View a
function’s documentation:
Type the function name in the Search box and find it directly.
Type the function name in the console and press F1.
Type ? before the function name and execute it.
9. The Viewer pane: The Viewer pane is a new feature; it was introduced
as an increasing number of R packages combine the functionality of both R
and existing JavaScript libraries to make rich and interactive presentations
of data.