standardize_kinder | R Documentation |
standardize_kinder
returns an integer vector grade levels.
standardize_kinder(x, other_codes = NULL)
x |
a character, integer, or numeric vector of grade levels |
other_codes |
a vector of alternative codes for kindergarten to be translated to 0 |
This function simply translates kindergarten codes 13 (from client-based
MAP), "K", or a user specified kinder_code
from an input vector x
to 0 and recasts the input vector to an integer vector.
an integer vector of length(x)
.
# Create vector of grades 1 through 13, where 13 = kinder
x <- sample(x=1:13, 100,replace = TRUE)
standardize_kinder(x)
# change 13 to "K"
x2 <- ifelse(x==13, "K", x)
standardize_kinder(x2)
# change "K" to "Kinder"
x3 <- ifelse(x=="K", "Kinder", x)
standardize_kinder(x2, other_codes="Kinder")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.