representNA: Convert "NA"s to NAs

Description Usage Arguments Value Note Author(s) Examples

View source: R/representNA.R

Description

A basic utility function converting "NA" strings to R's missing type, NA.

Usage

1

Arguments

x

A vector of class 'character', which may contain the string "NA" to be replaced with NA.

Value

Returns the vector x, with all "NA" elements recoded as NA.

Note

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.

Author(s)

David C. Norris

Examples

1
## TODO: Provide an example

VizOR documentation built on May 30, 2017, 5:29 a.m.