Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

imputemiss

Impute missing values in a variable


Description

Takes in a vector and a value, and returns the vector with missing values imputed with that value

Usage

imputemiss(vector, value)

Arguments

vector

a vector with missing values

value

the value to be used for imputation

Details

imputemiss imputes the missing (NA) values in the vector with a specified value. The function simplifies the code for imputation.

Value

vector of the same class as input vector with imputed missing values

Author(s)

Akash Jain

See Also

Examples

# Scores vector
scores <- c(1, 2, 3, NA, 4, NA)

# Imputd scores vector
scoresImp <- imputemiss(vector = scores, value = 5)

StatMeasures

Easy Data Manipulation, Data Quality and Statistical Checks

v1.0
GPL-2
Authors
Akash Jain
Initial release
2015-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.