Redacted education data files often have a "*" character. When importing into R this is a problem, which this function solves in a simple step by replacing "*" with NA, and then converting the vector to numeric.
a vector of data that should be numeric but contains characters indicating redaction forcing R to read it as character
the character string that should be removed from the vector.
Returns a vector of the same length as the input vector that is numeric with NAs in place of the character.
Future versions could be modified to accommodate other indicators of redacted data.
Jared E. Knowles
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.