Description Usage Arguments Details Value Examples
View source: R/data_imputation.R
This function fills any missing entries (NA,
Inf, null) in a matrix or dataframe, according to
a specified method. By default, '0' is considered a value.
1 2 | data_imputation(traj, id_field = FALSE, method = 2,
replace_with = 1, fill_zeros = FALSE, verbose=TRUE)
|
traj |
[ |
id_field |
[numeric or character] Whether the first column
of the |
method |
[an integer] indicating a method for calculating
the missing values. Options are: |
replace_with |
[an integer from 1 to 6] indicating the technique,
based on a specified |
fill_zeros |
[TRUE or FALSE] whether to consider zeros |
verbose |
to suppress printing output messages (to the console).
Default: |
Given a matrix or data.frame with some missing values
indicated by (NA, Inf, null), this function
impute the missing value by using either an estimation from the
corresponding rows or columns, or to use a regression method to
estimate the missing values.
A data.frame with missing values (NA, Inf,
null) imputed according to the a specified technique.
1 2 3 4 5 | # Using the example 'traj' datasets
imp_data <- data_imputation(traj, id_field = TRUE, method = 2,
replace_with = 1,
fill_zeros = FALSE, verbose=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.