mists-polish: Missing data polishing for tsibble

Description Usage Arguments Details See Also Examples

Description

If the proportion of overall missings is less than the cutoff,

Usage

1
2
3
4
5
6
7

Arguments

data

A tsibble.

cutoff

A numeric between 0 and 1. Rows/cols will be kept, if the proportion of overall missings is less than the cutoff.

na_fun

Either na_starts_with or na_ends_with.

Details

The proportion of overall missings is defined as the number of NA divided by the number of measurements (i.e. excluding key and index).

See Also

Other missing value polishing functions: na_polish_auto, na_polish_metrics

Examples

1
2
3
4
5
6
7
wdi_ts <- tsibble::as_tsibble(wdi, key = country_code, index = year)
(wdi_cols <- na_polish_measures(wdi_ts, cutoff = .7))
# columns removed
setdiff(names(wdi_ts), names(wdi_cols))
na_polish_key(wdi_ts, cutoff = .7)
na_polish_index(wdi_ts, cutoff = .7)
na_polish_index2(wdi_ts, cutoff = .7)

earowang/mists documentation built on Sept. 21, 2019, 1:12 p.m.