pgu.missings: pgu.missings

Description Format Details Active bindings Methods Author(s)

Description

Detects and substitutes missing values from data set.

Format

R6::R6Class object.

Details

Detects missing values in the transformed and normalized data set. This object is used by the shiny based gui and is not for use in individual R-scripts!

Active bindings

imputationParameter

Returns the instance variable outliersParameter. (tibble::tibble)

imputationSites

Returns the instance variable imputationSites. (tibble::tibble)

one_hot_df

Returns the positions of missings in one_hot encoding (tibble::tibble)

amv

Returns the instance variable amv. (numeric)

Methods

Public methods


Method new()

Creates and returns a new pgu.missings object.

Usage
pgu.missings$new(data_df = "tbl_df")
Arguments
data_df

The data to be cleaned. (tibble::tibble)

Returns

A new pgu.missings object. (pguIMP::pgu.missings)


Method finalize()

Clears the heap and indicates that instance of pgu.missings is removed from heap.

Usage
pgu.missings$finalize()

Method print()

Prints instance variables of a pgu.missings object.

Usage
pgu.missings$print()
Returns

string


Method resetImputationParameter()

Resets instance variables and identifies missings in the normalized data set.

Usage
pgu.missings$resetImputationParameter(data_df = "tbl_df")
Arguments
data_df

Dataframe to be analyzed. (tibble::tibble)


Method featureIdx()

Returns the position of an attribute within a data frame.

Usage
pgu.missings$featureIdx(feature = "character")
Arguments
feature

The attribute's name. (character)

Returns

The postion of the attribute. (numeric)


Method filterFeatures()

Selects features cotaining missing values from a dataset.

Usage
pgu.missings$filterFeatures(data_df = "tbl_df")
Arguments
data_df

Dataframe to be analyzed. (tibble::tibble)

Returns

The filtered data frame. (tibble::tibble)


Method gatherMeasurements()

Calculates the number of values of a vector.

Usage
pgu.missings$gatherMeasurements(value = "numeric")
Arguments
value

A vector comprising numeric data. (numeric)

Returns

The lenght of the vector. (numeric)


Method gatherMissings()

Calculates the number of missing values of a vector.

Usage
pgu.missings$gatherMissings(value = "numeric")
Arguments
value

A vector comprising numeric data. (numeric)

Returns

The number of missing in the vector. (numeric)


Method gatherExistings()

Calculates the number of existing values of a vector.

Usage
pgu.missings$gatherExistings(value = "numeric")
Arguments
value

A vector comprising numeric data. (numeric)

Returns

The number of existing values in the vector. (numeric)


Method gatherFractionOfMissings()

Calculates the fraction of missing values of a vector.

Usage
pgu.missings$gatherFractionOfMissings(value = "numeric")
Arguments
value

A vector comprising numeric data. (numeric)

Returns

The fraction of missing values in the vector. (numeric)


Method gatherImputationStatistics()

Gathers statistical information about missing values that are provided by the classes public gather functions. The information is stored within the classes instance variable imputationParameter

Usage
pgu.missings$gatherImputationStatistics(data_df = "tbl_df")
Arguments
data_df

The data frame to be analyzed. (tibble::tibble)


Method one_hot()

Gathers statistical information about missing values in one hot format. The result is stored in the instance variable one_hot_df.

Usage
pgu.missings$one_hot(data_df = "tbl_df")
Arguments
data_df

The data frame to be analyzed. (tibble::tibble)


Method detectImputationSites()

Detects missing values within the data frame and writes the to the instance variable imputationsites.

Usage
pgu.missings$detectImputationSites(data_df = "tbl_df")
Arguments
data_df

The data frame to be analyzed. (tibble::tibble)


Method imputationSiteDistribution()

Numeric representation of the distribution of missing values within the data frame.

Usage
pgu.missings$imputationSiteDistribution(data_df = "tbl_df")
Arguments
data_df

The data frame to be analyzed. (tibble::tibble)

Returns

A data frame (tibble::tibble) #' @description #' Merges the numeric attributes of the pguIMP data with its metadata. #' @param data_df #' The data frame to be analyzed. #' (tibble::tibble) #' @param metadata_df #' The corresponding metadata. #' (tibble::tibble) #' @return #' A data frame #' (tibble::tibble) mergeImputationSiteData = function(data_df = "tbl_df", metadata_df = "tbl_df") dfMerge <- data_df if(nrow(data_df) == nrow(metadata_df)) dfMerge <- dplyr::bind_cols(metadata_df, data_df) #if dfMerge %>% dplyr::filter_all(dplyr::any_vars(is.na(.))) %>% return() , #function


Method imputationSiteHeatMap()

Displays the distribution of missing values in form of a heatmap.

Usage
pgu.missings$imputationSiteHeatMap()
Returns

A heatmap plot. (ggplot2::ggplot)


Method clone()

The objects of this class are cloneable with this method.

Usage
pgu.missings$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Sebastian Malkusch, malkusch@med.uni-frankfurt.de


pguIMP documentation built on Sept. 30, 2021, 5:08 p.m.