Learn R Programming

shinyr (version 0.3.0)

imputeMyData: Impute My Data

Description

Impute for missing values in given column in a given data by given method.

Usage

imputeMyData(df, col, FUN)

Arguments

df

data frame to impute

col

a column name of data frame to impute

FUN

a function to be used for imputing values one of(mean, median, sum, min, max)

Value

data frame after imputing the values

Details

imputeMyData

Examples

Run this code
# NOT RUN {
x <- head(iris)
x$Sepal.Length[1] <- NA
imputeMyData(x, "Sepal.Length", "mean")
# }

Run the code above in your browser using DataLab