Description Usage Arguments Value See Also Examples
This function removes variables / obersvations from a dataset based on a percentage of missing data. The results are outputed as a data frame. Furthermore, the resulting data frame can be saved as .csv file in a specified directory.
1 2 | remove_variables(dataset, percentage = NULL, file_name = NULL,
directory = NULL)
|
dataset |
The dataset from which the variables / observations are removed. |
percentage |
The cut off percentage of missing observations for removing variables, the default is NULL. If a variable is missing more than the specified percentage then the variable is removed from the dataset. With the default set to NULL, all missing observations are removed from the dataset. |
file_name |
A character object indicating the file name when saving the data frame. The name must include the .csv suffixs. The default is NULL. |
directory |
A character object specifying the directory where the data frame is to be saved as a .csv file. |
Outputs the completed data as a data frame.
derive_variables
, extract_variables
, impute_variables
, standardise_variables
, transform_variables
1 2 3 4 5 6 | # Example 1 - Titanic
descriptive_statistics(dataset = titanic, type = "numeric")
# remove all missing observations form the data frame
remove_variables(dataset = titanic)
# remove all variables that are missing over 15% of their observations
remove_variables(dataset = titanic, percentage = 15)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.