This article is going to follow my last article, which was the introduction to R, and how to install it. After this, you will know how to create a labeled graph using an R script.
Objectives of the article:
ú Create script file
ú Load a library package
ú Draw and label a graph
SCRIPTING IN R
If you’re able to run R with the command-line interface (CLI), then you can just follow the instructions as such:
- Open the command console. On Windows 8.1 you will just press the start and search for command’ or ‘cmd’.
- Once here you can simply open the application with ‘R’ enter, or ‘R --quiet’ and hit enter. The latter function will be quicker and the ‘quiet’ descriptor just means there is no boilerplate language after opening the app.
- Download the zip script file titled ‘r_script_example.r’ at http://daily.liaisons.press/r_script_example.r.zip
- Unzip the file and place it in the ~\bin folder where you installed the R application, this is the folder that has your Rterm console. You will need this to run the next step.