impute.FIA-proFIAset-method: Fill missing values using the provided method.

Description Usage Arguments Examples

Description

Impute the missing values in an FIA experiment using a Weighted K-Nearest Neighbours on Truncated Distribution implemented in impute.KNN_TN or by random forest using the impute.randomForest function.

Usage

1
2
## S4 method for signature 'proFIAset'
impute.FIA(object, method = c("KNN_TN", "randomForest"), ...)

Arguments

object

A proFIAset object.

method

The method to be used for missing value imputation.

...

Arguments furnished to the imputation method. No argument is required for impute.randomForest and the number of neighbours should be furnished using the impute.KNN_TN function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if(require(plasFIA)){
    data(plasSet)

    ###Reinitializing the data matrix an using KNN
    plasSet<-makeDataMatrix(plasSet,maxo=FALSE)
    plasSet<-impute.FIA(plasSet,method="KNN_TN",k=2)
    
    ###Reinitializing the data matrix and using randomForest
    plasSet<-makeDataMatrix(plasSet,maxo=FALSE)
    plasSet<-impute.FIA(plasSet,method="randomForest")
}

proFIA documentation built on March 20, 2021, 6 p.m.