install.packages(c(
"tidyverse",
"tinyplot",
"sf",
"bruneimap",
"tidytext",
"tm",
"wordcloud",
"gtsummary",
"devtools",
"scales",
"mvtnorm",
"titanic",
"ggthemes",
"viridis",
"ggrepel",
"RColorBrewer"
))
::install_github("haleyjeppson/ggmosaic") devtools
🛠 Machine Setup
Welcome! Prior to attending the seminar talk, please ensure you have done the following.
1. Install R and RStudio
Download both software at https://posit.co/download/rstudio-desktop/.
Once the download completes, double-click on the
.exe
file to run the installer. Simply follow the steps of the installer to finish.
Note: These are two different softwares, so please ensure you have installed both of them. For more detailed guideline, visit link.
2. Download Workshop material
Visit https://github.com/haziqj/aiti-talk on your search engine.
Press on the green
code
icon on top right.Option 1: Open with Github Desktop and clone the repo onto a convenient location on your computer.
Option 2: Download the zip file and unzip onto a convenient location on your computer.Click on
aiti-talk.Rproj
to open the project in RStudio.
3. Install all packages
- Launch Rstudio app directly. It will look something like:
Note: Previously, we installed both R (language) and Rstudio (IDE). However, all coding can be done in just Rstudio.
- Install the following R packages by running the following code in the
console
pane:
4. Ready to start! 🥳
Quick Tips
To work on long chunks of codes, it is recommended to use the
source
pane by creating a R Script.To create a R Script: File > New File > R Script
To run code: press
Ctrl + Enter
(Windows) orCmd + Enter
(Mac). Alternatively, pressrun
icon (top right) of thesource
pane.To load libraries for additional functions, run the codes in
source
pane:
library(tidyverse)
library(ggplot2)
Try it out!
print("Hello, World!")
[1] "Hello, World!"
From simple printing to complex visualisation, possibilities are now limitless, Happy coding!