Learn R Programming

berryFunctions (version 1.10.0)

na9: Prepend spaces before na.strings

Description

Returns a number of useful character strings with varying amount of spaces prepended. It can be used as na.strings=na9() in read.table.

Usage

na9(nspace = 5, base = c("-9999", "-999", "-99", "-9.99", "-9.9", "-9,99", "-9,999"), more = NULL, ...)

Arguments

nspace
number of spaces prepended. DEFAULT: 5
base
basic na.string structures. Might be expanded in the future. Thankful for suggestions. DEFAULT: c("-9999","-999", "-99", "-9.99", "-9.9", "-9,99", "-9,9")
more
More structures added to base, like "NA", "--". DEFAULT: NULL
...
Arguments passed to nothing currently

Value

Character strings

See Also

paste

Examples

Run this code

na9()
na9(more=c(NA,"-"))

Run the code above in your browser using DataLab