cleanup tests and build
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -78,7 +78,7 @@ pretty_count <- function(x) {
|
||||
|
||||
#' Unsuppress data using sampling
|
||||
#'
|
||||
#' @param x
|
||||
#' @param x a vector
|
||||
#' @param replace_char the character you want to replace in the vector
|
||||
#' @param zeros the number of zeroes to oversample when replacing replace_char
|
||||
#' @param max_value the numeric maximum value the replacement for the "*" can be
|
||||
@@ -103,10 +103,11 @@ star_subs <- function(x, replace_char = "*",
|
||||
#'
|
||||
#' @param x character description of grade levels from NCES style data
|
||||
#'
|
||||
#' @return
|
||||
#' @return a numeric vector
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' grade_level_to_num(c("KG", "Pre-K", "12", "10", "09"))
|
||||
grade_level_to_num <- function(x) {
|
||||
# Cannot generate new levels if it is a factor so we coerce to character first
|
||||
x <- as.character(x)
|
||||
@@ -122,10 +123,11 @@ grade_level_to_num <- function(x) {
|
||||
#'
|
||||
#' @param x a character vector with NCES race codes, often from Urban Institute
|
||||
#'
|
||||
#' @return
|
||||
#' @return recoded race categories following NCES race codes
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' race_short_names(c("Black", "Hispanic Or Latino", "Two Or More Races"))
|
||||
race_short_names <- function(x) {
|
||||
x <- as.character(x)
|
||||
x[x %in% c("Black", "Black Or African American", "Black or African American",
|
||||
|
||||
Reference in New Issue
Block a user