Getting started with R
Based on R for Social Sciences
Non-exercise math
Assignment
TipSolution
The assignment operator
x <- 5Exercises have their own environment, so x has to be redefined.
Vector
Make x a vector of numbers.
NoteHint 1
Make sure to use the assignment operator (<-)
x <- ______
NoteHint 2
Vectors are created using the c() function, which stands for combine.
x <- c(______)
TipFully worked solution:
Values within c() are separated by commas.
x <- c(1, 3, 5, 7, 9)You can also put exercises in a tabset: Make y a vector of numbers.
Vectors are created using the c(), which stands for combine.
y ______ c(______)Vectors are created using the c() function, which stands for combine.
y <- c(______)y <- c(1, 3, 5, 7, 9)Can run help. Prints out help file. An