[1] "/Users/tita/course-R-2425/materials/1_intro"
Let’s create a script, a “text” file where you write and save your code.
Let’s save it:
RStudio is divided into 4 main panes:
RStudio is divided into 4 main panes:
Script. The text file where you write and save your code. You can run one line at a time (Ctrl + Enter / Cmd + Enter) or the whole script by clicking Source. Comments are added with #.
Console. This is where R runs the code and shows the results. You can type commands directly in the console for quick tests, but they are not saved.
Environment / Temporary desk. Shows all the objects created during the current session.
Miscellaneous. A multi-purpose pane with several tabs, including the file explorer.
The location (folder) on your PC where R is working and where R expects to find your files, unless specified otherwise.
PC
|- Users
|
|- tita
|
|- course-R-2425
|
|- materials
|
|- 1_intro
I am working inside the 1_intro folder.
setwd command:Now move the prova.csv outside the introR folder (e.g., in the desktop), and run the same command..
If we want to load a file located outside our wd, we need to refer to it through its absolute path:
Create an R project!