fillna: Interpreting empty locations in indices

Description Usage Arguments Details Value Author(s) Examples

Description

Copies result rows that have NAs as index values and replaces the index value with all available values of that index.

Usage

1
fillna(object, marginals)

Arguments

object

a data.frame to be filled

marginals

integer, positions of columns whose locations contain NAs that should be duplicated

Details

Runs dropall before duplication to avoid unnecessary levels.

See also: http://en.opasnet.org/

Value

Returns a data.frame

Author(s)

J. Tuomisto jouni.tuomisto@thl.fi

Examples

1
2
a <- data.frame(A = c("a", "b", NA), B = c(1, 2, 3))
fillna(a, 1)

OpasnetUtils documentation built on May 2, 2019, 12:39 p.m.