Familiarizing yourself with RStudio
Compared to RStudio, the Python development process that has been used in previous chapters has been a bit indirect. Code has been written in a text editor to perform a particular function and then executed as a whole through a separate interface.
Writing code in RStudio is more of an iterative process. Code can be run line by line from the editor, and data and variables are stored continuously within the environment. This means that you can conduct analysis, observe the data, and verify the correctness of your code as you go. The following steps can be used to create an R script in RStudio.
- To begin with, open the RStudio program:
- From RStudio, you can create a new R script by selecting
File
|New
|Rscript
. This will create and open a.R
file in the text editor:
- This will open the script for editing. You can save the script to your
ch6
folder by selectingFile
|Save
. The name of the script is not that important here, but I will name miner_intro
. Note that...