Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.34 KB

README.md

File metadata and controls

50 lines (35 loc) · 1.34 KB

Rpackage.missingDetect

Title: Detect the proportion of missing values in columns of tibble/dataframe

Version: 0.1.0

The goal of Rpackage.missingDetect is to calculate the proportion of missing values for each column in a dataset and output the result of columns having NA existed.

Installation

Rpackage.missingDetect is not yet on CRAN. You can download this development version from GitHub using the following R command:

devtools::install_github("stat545ubc-2021/Rpackage.missingDetect")

Example

This is a basic example which shows you how to detect data missing problems of a tibble dataset:

library(Rpackage.missingDetect)
missing_prop_detect(palmerpenguins::penguins)
#> # A tibble: 1 × 5
#>   bill_length_mm bill_depth_mm flipper_length_mm body_mass_g    sex
#>            <dbl>         <dbl>             <dbl>       <dbl>  <dbl>
#> 1        0.00581       0.00581           0.00581     0.00581 0.0320

This package can also work on a input of dataframe:

df<- as.data.frame(palmerpenguins::penguins)
missing_prop_detect(df)
#>   bill_length_mm bill_depth_mm flipper_length_mm body_mass_g        sex
#> 1    0.005813953   0.005813953       0.005813953 0.005813953 0.03197674