na9: Prepend spaces before na.strings

View source: R/na9.R

na9R Documentation

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, -9.99, -9.999),
  sep = c(",", "."),
  digits = 0:4,
  more = NULL,
  ...
)

Arguments

nspace

number of spaces prepended. DEFAULT: 5

base

Numeric: basic na.string numbers

sep

Separator string (comma or decimal point or both). DEFAULT: c(",",".")

digits

Number(s) of zeros to be appended. DEFAULT: 0:4

more

More structures added to base, like "NA", "–". digits and sep is not added to this! DEFAULT: NULL

...

Arguments passed to nothing currently

Value

Character strings

Author(s)

Berry Boessenkool, berry-b@gmx.de, Jan 2016

See Also

paste

Examples


na9()
na9(nspace=0, sep=".")
na9(nspace=0, sep=".", more=c(NA,"-"))


berryFunctions documentation built on May 29, 2024, 4:01 a.m.