antsrimpute: antsrimpute

View source: R/antsrimpute.R

antsrimputeR Documentation

antsrimpute

Description

Impute NA's on data frame.

Usage

antsrimpute(mydat, FUN = mean, ...)

Arguments

mydat

Data frame to be imputed.

FUN

Method to be used for imputation (defaults to mean).

...

Additional parameters to pass to FUN.

Details

Imputes NA's on data frame (column-wise), using a user-specified function (mean is default). also works on a vector.

Value

Returns mydat with NA's replaced by imputed numbers.

Author(s)

Kandel BM, Avants BB

Examples


mydat <- data.frame(A = c(1, 2, 4, 5), B = c(1, NA, 4, 5))
mean.impute <- antsrimpute(mydat)
mean.impute <- antsrimpute(mydat$B)
median.impute <- antsrimpute(mydat, median)


stnava/ANTsR documentation built on March 24, 2024, 6:13 a.m.