Page 191 - Data Science class 11
P. 191
Step 4: Type the file name in the File name text box. In this case, we have typed FirstProgram.
Step 5: Click on the Save button.
The R script file is saved with the .R extension.
5.2.3 running an r Language Program
To run an R language program, click on the Run icon. The output of the program will appear in the Console
window.
You can also type commands in the Console window directly. The main drawback of typing commands in Console
window is that the typed commands will be forgotten when we close the close the RStudio. There is no option to save
them.
After typing the command, when you press the Enter key, you will get the output of the typed command instantly.
Here are some simple examples:
Introduction to RStudio 189

