| dataprep | R Documentation |
Performs variable deletion (varidele), observation deletion (obsedele), conditional extremum outlier removal (condextr), and short-period interpolation (shorvalu) in sequence.
dataprep(data, cols = NULL, group = NULL, optimal = FALSE,
interval = 10, times = 10, fraction = 0.25,
top = 0.995, top.error = 0.1, top.magnitude = 0.2,
bottom = 0.0025, bottom.error = 0.2, bottom.magnitude = 0.4, by = "min",
half = 30, intervals = 30, date_col = NULL, cores = NULL, verbose = FALSE)
data |
A data frame containing numeric columns and optionally a grouping column. |
cols |
Column indices or names of numeric variables to process. |
group |
Grouping column index or name. |
optimal |
Logical; if |
interval |
Number of outlier-marking rounds between two observation-deletion rounds inside |
times |
Number of observation-deletion rounds in |
fraction |
Missing proportion threshold for variable deletion. |
top, top.error, top.magnitude, bottom, bottom.error, bottom.magnitude |
Outlier removal parameters. |
by |
Time unit for observation deletion. An invalid unit string raises an error. |
half |
Half window size in minutes for observation deletion. |
intervals |
Time gap for interpolation periods. |
date_col |
Time column index or name. If |
cores |
Number of CPU cores passed to |
verbose |
Logical; if |
A preprocessed data frame.
Chun-Sheng Liang <chun-shengliang@qq.com>
1. Example data is from https://smear.avaa.csc.fi/download. It includes particle number concentrations in SMEAR I Varrio forest.
dataprep(data[1:60, c(1, 4, 18:19)], cols = 3:4, group = 2, interval = 2, times = 1, cores = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.