clean_fac_col_txt: Cleans character data that has been scraped from websites

View source: R/clean_fac_col_txt.R

clean_fac_col_txtR Documentation

Cleans character data that has been scraped from websites

Description

Cleans data usually associated with facilities or column names. Specifically removes special characters (except spaces and dashes), capitalizes COVID, standardizes COVID-19 references, removes new line indicators and excess white space, and changes "state-wide" to "statewide" (case-insensitive). Optionally capitalizes output.

Usage

clean_fac_col_txt(x, to_upper = FALSE)

Arguments

x

character vector to clean

to_upper

logical, convert characters to upper case

Value

cleaned character vector

Examples

clean_fac_col_txt(" Messy string \n\r data   ")


uclalawcovid19behindbars/behindbarstools documentation built on April 22, 2022, 4:08 a.m.