Description Usage Arguments Details Value Author(s) Examples
label_schools
creates a vector containing a different label for the schools in SFPS. It can create a numeric ("num"), abbreviation ("abbr"), or long form name ("name").
EX: 8, "AMES", "Acequia Madre Elementary"
1 2 3 4 | label_schools(school,
to = "abbr",
from = NA,
current = TRUE)
|
school |
an atomic vector of the schools to be relabeled. |
from |
The existing form that |
to |
the form of the output. Choose from |
current |
if |
label_schools
uses the data set convtable included in SvenR
. The old codes for El Camino Real are coerced to num
= 11 or abbr
= "ECCS" from 174 and c("ECRA","AFES").
a vector of the relabeled values of school
Sven Halvorson (svenedmail@gmail.com)
1 2 3 4 5 6 7 | data = data.frame(esquela = c("madre elem","Agua Fria", "Gilberto University","Capital", "Capshawdawg"))
data$newname = label_schools(school = data$esquela, to = "abbr")
data$newname2 = label_schools(school = data$esquela, to = "name", current = FALSE)
data$num = label_schools(school = data$newname, to = "num")
View(data)
#Bojangles! We did it!
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.