R Code Flashcards
1
Q
Remove an observation based on a criteria
A
data[data$variable != criteria, ]
2
Q
Create a Correlation matrix
A
df %>% select_if(is.numeric) %>% cor()
3
Q
Split data into testing/training set
A
train_ind
4
Q
To create a cp table
A
model_name$cptable
5
Q
Print coefficients after regularization
A
model_name$beta