https://github.com/mmollerup/RGhana
R - https://cloud.r-project.org/ -
R Studio - https://www.rstudio.com/products/rstudio/download/#download
Help - is available on the comprehensive R archive
eg. network(cran). To search for help
anova()
or?anova
orhelp(anova)
Sites such as http://www.stackoverflow.com and http://www.stackexchange.com , as well as
a< - c(1,2,3,4,5) - vector
rep(a) —- Replicates table
Matrix - rectangular arrangement of rows and
head() - sample of data
str() - attribute of data
https://drive.google.com/drive/folders/15U8WjVKbYXaq6N6Wb_6bCr9QZ1DwCkAO
The language of data science
Free and open source
Optimised for vector operation ( run through series of data without for loops)
Visit R-project.org and download R
Install R
The R interface has the
Script - view for script
Console - view of output
Use # before the start of a row to comment it
Library(dataset)
head(iris) - 6 lines of data
summary(iris) - summary statistics
plot(iris)- scatterplot matrix
Detach("package.datasets", unload=True) - clears data
Dev.off() - clears plot
Cat("\014") - clear console (ctrl+l)
Software that makes working with R easier
Visit Rstudio.com download desktop version and install
The R Studio interface has
Bundles of code that give you super powers
Source:
Crantastic! - install.packages("crantastic")
Popular packages
Pacman - one package for them all
install.packages("pacman")
require(pacman)
library(pacman)
pacman::p_load(pacman, dplyr, GGally, ggplot2, ggthemes, ggvis, httr, lubridate, plotly, rio, rmarkdown, shiny, stringr, tidyr)
Library(datasets)
P_unload(all) - clear all packages
P-unload(specifice package) - clear specific package
Detach("package:datasets", unload true) - clear base packages
Basic x-y plotting
Adjust to datatype and variables