Console, Scripting Window, Files/Plots/Packages/Help, Environment - What are the
R studio's four main locations?
In Plots tab - Where are created plots stored?
help() - Which function is used to get info on a function in R studio?
<- and = - What symbol(s) are used to create an R object?
data() - Which function is used to show available built-in data sets?
object-oriented programming (OOP) - R has strong ____________ __________
__________ tools
object - data structure with attributes (often a "class")
Method - Procedures (often "functions") act on object based on attributes
class() - This function describes the class attribute of an R object
typeof() - This function determines the (R internal) type or storage mode of any
object
str() - This function compactly displays the internal structure of an R object
Atomic Vector - 1D and Homogeneous
List - 1D and Heterogeneous
Matrix - 2D and Homogeneous
Data frame - 2D and Heterogeneous
Array - nd and homogeneous
Vector - 1D group of elements with an ordering, elements must be same "type"
c() - Function used to create a vector
seq() - Function that outputs a sequence of numbers from inputs(from, to, by)
num - ____ means it's numeric
num - str(vector) outputs these three letters
: - Which punctuation can be used to create a sequence?
1:20 - What would you write to create a seq of 1 to 20 using the semicolon?
, Element-wise (does the operation on each element) - R does ______________ math
on vectors
1 - R starts counting/indexing at
vector[#] - Notation for returning elements using index
letters[1:4] - Write code to return the first 4 elements of vector called letters
letters[c(5, 10, 20)] - Write code to return the 5th, 10th, and 20th elements of letters
vector
Negative indices - What do you write to return all elements except the ones listed?
I.e. to return a vector/list without specified elements
letters[-(1:4)] - Write code that returns all elements in letters vector except the first
four?
data frame - Collection (list) of vectors of the same length
columns - The vectors act as __________ in a data frame
data frame - this data structure is perfect for data sets
observations - the rows in a data frame are the _______
first [x, ] - when indexing in DF, the rows are put _______ in the brackets
second [ , x] - when indexing in DF, the columns are put _______ in the brackets
data.frame() - function used to create data frame
true, "data.frame(var_name = data_vector)" - true or false: variable names can be
put into the data.frame() function
true "myDF[ , c("[var1_name]", "[var2_name]")] - true or false: you can index the
variable names in a DF
$ - which symbol can you use to access a single column in a DF?
myDF$char - write code to access the column "char" from myDF using "$"
list - 1D group of objects with ordering, can have differing kinds of elements
list() - function used to create a list
true - true or false: you can add names to list elements
$normVals - write code to access list element by its name "normVals"