1/9
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
fct_relevel(data, c("level 1", "level 2", "level 3"))
Manually reorders levels
fct_recode(data, "1" = "level 1", "2" = "level 2", "3" = "level 3")
Manually changes level labels
fct_reorder(data, variable)
Reorders levels according to values of another variable
str_to_lower(column)
Converts all letters to lowercase
str_length(column)
Records the number of characters
str_detect(column, "pattern")
Returns TRUE if it contains the given pattern and FALSE otherwise
str_replace(column, "pattern", "replacement")
Finds the first instance that matches the given pattern and replaces it
str_replace_all(column, "pattern", "replacement")
Finds all instances that match the given pattern and replaces them
str_sub(column, start #, end #)
Only keeps a subset of characters, from the start number to the end number
separate(column, c("Column 1", "Column 2"), sep = " "))
Splits data into separate columns