Description Usage Arguments Examples
This function allows you to fill the missing values of a continuous variable for a given data set. According to the Kolmogorov-Smirnov test, if the variable is distributed normally, the NA values are filled with the mean value, otherwise they are filled with the median value.
1 | na_filler_contvar(data, variable, pvalue = 0.05)
|
data |
A data set needs to be defined. |
variable |
A variable need to be defined as a string. |
pvalue |
A p-value threshold need to be defined. |
1 2 3 4 5 | name <- c('John Doe','Peter Gynn','Jolie Hope')
birth_year <- c(1980, 1985, 1971)
salary <- c(20000,NA,10000)
example_data <- data.frame(name,birth_year,salary)
na_filler_contvar(example_data,"salary")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.