You should install R before installing RStudio.
- Go to world wide CRAN mirror: https://cloud.r-project.org/
- Select you OS
- Select “base” (if you want to install R for the first time)
- Download and run
This is a wrapper for a friendly usage of R.
- Go to RStudio download website: https://rstudio.com/products/rstudio/download/
- Select the Free RStudio Desktop version
- Download and run
Open RStudio (not R !).
If you type sessionInfo()
at the console, it will show you the
packages you have with your installation.
You can install packages by the menu on the Packages tab
Try to install readxl
(to deal with MS Excel files). It will install
also some dependent packages.
You may also type in the console the packages or group of packages you’d like to install. Try to install these three packages with the console:
tidyverse
- a group of basic packages to deal with data trames and graphics,RColorBrewer
- a package to use beautiful color palettes, anddevtools
- a package to deal with the development versions of packages
Type
install.packages(c("tidyverse","devtools","RColorBrewer"))
Even if you want only one package, the command is in plural :)
Simply by calling them;
library(tidyverse)
librar(readxl)
...
When you restart R (Ctrl + Shift + F10
) you’ll need to load packages
again.
You can click here at the upper left icon, and select R Script
Or Ctrl + Shift + F
Or in the console, type file.edit("startup.R)
Start by typing the aim of that script, commented with a cardinall
(#)
You can comment/uncomment any line by selecting it and press
Ctrl + Shift + C
Save the script.
Step by step:
- click on “Session”;
- Click on “Set working directory”;
- Click on “Choose directory” and select the folder that contains the dataset.
Or you could just run
setwd("D:/TDM/Transport-Demand-Modelling") #for instance
And .RData
Tools > Global Options > Appearence > Editor Theme > ...
Try to change to “Cobalt”, or check others you may like.
You can also change font, font-size, and even the panels layout.