impute_mean: Impute the mean value into a vector with missing values

View source: R/impute_mean.R

impute_meanR Documentation

Impute the mean value into a vector with missing values

Description

Impute the mean value into a vector with missing values

Usage

impute_mean(x)

## Default S3 method:
impute_mean(x)

## S3 method for class 'factor'
impute_mean(x)

Arguments

x

vector

Value

vector with mean values replaced

Examples


vec <- rnorm(10)

vec[sample(1:10, 3)] <- NA

impute_mean(vec)


naniar documentation built on Feb. 16, 2023, 5:11 p.m.