variable
A named object corresponding to a space in computer memory that can be assigned a value
In R, variables are assigned using <-, e.g.
x and y are the variable names, 5 and "a character variable" are the assigned values.
Variable values can be re-assigned.
variable type
The mode and size of the variable’s stored value(s)
Types can be:
variable structure
A way to arrange and store multiple data values for efficient access
vector
a sequence of multiple values of the same type (think about a column in a spreadsheet)
A Lego vector with same-type studs
list
a sequence of multiple values; these values can be of the same or different data type.
A Lego list with different-type studs
data frame
a list of vectors which all have the same length.
(Essentially, this is a spreadsheet with strict column/row requirements)
A Lego data frame - a list of vectors of the same length, with each vector having a different type.
Use the str() command to investigate the structure of an object
