badindex_add: Add bad values

Description Usage Arguments Value Note Author(s) See Also

Description

This function will add predefined text to a specified vector. The special aspect is that it will not repeat the text if it exists.

Usage

1
2
badindex_add(data, subset, badstring, badindex = "BADVAL",
  override_NA = TRUE, separator = ", ")

Arguments

data

A data frame containing a column with an index of bad values.

subset

Integer. A vector specifying the rows that contain bad values.

badstring

Character. Specify the text for indexing (i.e. the names of columns that contain bad values).

badindex

Character. Name of a column of the data frame that serves as an index for bad values.

override_NA

Logical. Choose TRUE if you want to override NA values.

separator

Character. Specify the separator between the text. It is not advisable to use '|'.

Value

'badindex' column (vector).

Note

The idea behind the function is that you can specify a subset of a data frame and add values to it, without overriding existing values. It is meant to prepare the data frame before calling badvalue_rm.

Author(s)

Frederik Sachser

See Also

badvalue_rm, badindex_rm


sachserf/badval documentation built on May 29, 2019, 12:21 p.m.