complete solutions
R code: + - correct answer ✔✔addition
R code: - - correct answer ✔✔subtraction
R code: * - correct answer ✔✔multiplication
R code: / - correct answer ✔✔division
R code: ^ - correct answer ✔✔exponent
R code: # - correct answer ✔✔note (anything after this symbol will be ignored by R)
R code: <- - correct answer ✔✔defines an object
R code: c - correct answer ✔✔combine function (creates a vector of numbers. numbers can either be
separated by commas, or by a colon (1,2,3,4) or 1:4)
R code: seq() - correct answer ✔✔sequence function (creates a vector with the sequence (from, to, by)
ex: seq(1,10,0.1) creates a vector from one to 10 counting by 0.1)
R code: help(functionName) - correct answer ✔✔help function (opens a web browser to display a help
file)
R code: NA - correct answer ✔✔missing value
, R code: mean () - correct answer ✔✔average
R code: na.rm=T - correct answer ✔✔removes all missing values (from the given data set. in R all missing
values are labeled as NA)
R code: sqrt() - correct answer ✔✔square root
R code: log() - correct answer ✔✔natural logarithm
R code: exp(a) - correct answer ✔✔e^a
R code: sd() - correct answer ✔✔sample standard deviation
R code: var() - correct answer ✔✔sample variance
R code: length() - correct answer ✔✔length of vector (including NAs)
R code: dim() - correct answer ✔✔dimension of data frame - rows, columns
R code: factor(x) - correct answer ✔✔makes R recognize x as categorical
R code: cbind() - correct answer ✔✔bind (combine) objects by columns
R code: rbind() - correct answer ✔✔bind objects by rows
R code: sort() - correct answer ✔✔sort from smallest to largest
R code: order() - correct answer ✔✔sort a data frame based on specified columns(s)