Description Usage Arguments Details See Also Examples
If the proportion of overall missings is less than the cutoff,
na_polish_measures()
removes columns or observations.
na_polish_key()
polishes data by rows or observations, removing the whole
rows of key series.
na_polish_index()
polishes data by rows or observations, removing either
the starting or the ending NA
blocks (if any) within each key series.
na_polish_index2()
polishes data by rows or observations, removing the
ending NA
blocks (if any) within each key series. It is a shortcut of
na_polish_index(na_fun = na_ends_with)
.
1 2 3 4 5 6 7 | na_polish_measures(data, cutoff)
na_polish_key(data, cutoff)
na_polish_index(data, cutoff, na_fun = na_starts_with)
na_polish_index2(data, cutoff)
|
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 |
The proportion of overall missings is defined as the number of NA
divided
by the number of measurements (i.e. excluding key and index).
Other missing value polishing functions: na_polish_auto
,
na_polish_metrics
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.