Keys in the master calendar's cal_key
column have prefixes according to
the type of calendar entry they represent (e.g., "LAB_
" for labs,
"CLS_
" for classes/reading assignments, "EXAM_
" for exams, etc.). This
function strips those off.
strip_key_prefix(x, type, ...)
# S3 method for character
strip_key_prefix(x, type, ...)
# S3 method for list
strip_key_prefix(x, type, ...)
# S3 method for data.frame
strip_key_prefix(df, type, col = "cal_key")
An object to process.
The type of calendar entry to strip (e.g., "class
", "lab
",
etc.)
Arguments to pass to specialized methods.
The data frame to process.
The column where the keys are located (by default "cal_key
").
A list or vector frame with the prefixes stripped from the contents.
A data frame with the prefixes stripped from the specified column.
strip_key_prefix(character)
: Strip key prefixes from character vector.
strip_key_prefix(list)
: Strip key prefixes from a list of character objects.
strip_key_prefix(data.frame)
: Strip key prefixes from a column in a data frame.
add_key_prefix
add_key_prefix