Description Usage Arguments Value Note Author(s) Examples
A basic utility function converting "NA" strings to R's missing type, NA.
1 | representNA(x)
|
x |
A vector of class 'character', which may contain the string "NA" to be replaced with NA. |
Returns the vector x, with all "NA" elements recoded as NA.
It is quite possible that this function should be removed, and that the issue of NAs coded as "NA" ought to be resolved by standardized workflows or SOPs for upstream data management. Conversely, if we retain this function, it should be expanded through an optional argument allowing specification of a set of strings to be recoded as NA; this argument might default to c("NA", "."), for example.
David C. Norris
1 | ## TODO: Provide an example
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.