| formatNA {relevance} | R Documentation |
Print NA values by a Desired Code
Description
Recodes the NA entries in output by a desired code
like " ."
Usage
formatNA(x, na.print = " .", digits = getOption("digits"), ...)
Arguments
x |
object to be printed, usually a numeric vector or data.frame |
na.print |
code to be used for |
digits |
number of digits for formatting numeric values |
... |
other arguments to |
Details
The na.encode argument of print only applies to
character objects. formatNA does the same for numeric arguments.
Value
Should mimik the value of format
Author(s)
Werner A. Stahel
See Also
Examples
formatNA(c(1,NA,3))
dd <- data.frame(X=c(1,NA,3), Y=c(4,5, NA), g=factor(c("a",NA,"b")))
(rr <- formatNA(dd, na.print="???"))
str(rr)
[Package relevance version 2.1 Index]