
open the RStudio and you get a window with three subwindows:
- console → where we type the commands
- environment/History
- Files/Plots/Packages
CONSOLE TAB:
> To indicate a “prompt”
- how to instal “swril” in my computer:
- tools → install packages… → packages() “swirl”
- alternatively we can do it in the console: “install.packages(“swirl”)”
- enable it through “library(“swirl”)
- Typing skip() allows you to skip a question.
- play() let’s you experiment on your own
- bye() makes swirl exit.
- main() returns to swirl main menu
- info() displays the options again.
INTERNET COURSES
- Rprogramming
- Regression Models → the basics of regression modeling with r
- statistical inference
- Exploratory Data Analysis
mean → mean(variable)
median → median(variable)
mode → table(variable)
variance → var(variable)
standard deviation → sd(variable)
assigning a name to a variable:
x <- name
dataset$variable:
- dataset → nombre documento
- variable → la columna que nos interesa
survey <- rbind(m_left, m_right, f_left, f_right)
(to stack together different tables)
barplot(table(survey(PREFER))
STEMPLOT → of the gpa values:
“stem(survey(GPA))”
BOXPLOT → of the gpa
“boxplot(survey(GPA))”
library(psych)