Learn R Programming

shinyr (version 0.4.2)

imputeMyData: Impute My Data

Description

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

Usage

imputeMyData(df, col, FUN)

Value

data frame after imputing the values

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)

Author

Jayachandra N

Details

imputeMyData

Examples

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

Run the code above in your browser using DataLab