1/4
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
vectors in R
Vectors are variables that store multiple pieces of information
◦ create vectors using c()
◦ extract specific elements using [ ]
as.factor()
A factor is a nominal scale variable
Use the “as.factor()” command to convert a character vector to a factor
built-in functions in R
The order of the arguments matters, unless you specify the names
e.g. The default number of digits to round to is 0
reading in data files
variable ← read.csv(file)
subset data frame
create a variable for a certain group (subset) of data and calling it
e.g. makes ← expt$gender == ‘male’
expt[males,]