naToString: Convert NA to string "NA"

Description Usage Arguments Value

View source: R/missing.R

Description

When renaming the levels of a factor, it is often helpful to allow the renaming of the NAs themselves. This allows that, in combination with changeLevels. This function converts the NAs to a string "NA", which then becomes a level of the factor.

Usage

1

Arguments

x

A data.frame, containing columns of factors

Value

The data frame, with the NAs converted to strings "NA"


rjbgoudie/utils.rjbg documentation built on May 27, 2019, 9:13 a.m.