impute_missing-methods: Impute feature value if missing from element-feature pairs

impute_missingR Documentation

Impute feature value if missing from element-feature pairs

Description

impute_missing() takes as input a 'tbl' formatted as | <element> | <feature> | <value> | <...> | and returns a 'tbl' with an edditional adjusted value column. This method uses scaled counts if present.

Usage

impute_missing(.data, .element, .feature, .value, .formula)

## S3 method for class 'spec_tbl_df'
impute_missing(.data, .element, .feature, .value, .formula)

## S3 method for class 'tbl_df'
impute_missing(.data, .element, .feature, .value, .formula)

Arguments

.data

A 'tbl' formatted as | <element> | <feature> | <value> | <...> |

.element

The name of the element column

.feature

The name of the feature/gene column

.value

The name of the feature/gene value column

.formula

A formula with no response variable, representing the desired linear model where the first covariate is the factor of interest and the second covariate is the unwanted variation (of the kind ~ factor_of_intrest + batch)

Details

\lifecycle

maturing

This function imputes the value of missing element-feature pair using the median of the element group defined by the formula

Value

A 'tbl' non-sparse value

A 'tbl' with imputed abundance

A 'tbl' with imputed abundance

Examples


 impute_missing(mtcars_tidy, car_model, feature, value, ~1)


stemangiola/nanny documentation built on July 29, 2023, 1:23 a.m.