diff --git a/README.md b/README.md index 9947753..8add4a1 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ mde: Missing Data Explorer ================ -2021-09-19 +2022-01-31 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3890659.svg)](https://doi.org/10.5281/zenodo.3890659) -[![CRAN\_Status\_Badge](https://r-pkg.org/badges/version/mde)](https://cran.r-project.org/package=mde) -[![CRAN\_Release\_Badge](https://www.r-pkg.org/badges/version-ago/mde)](https://CRAN.R-project.org/package=mde) +[![CRAN_Status_Badge](https://r-pkg.org/badges/version/mde)](https://cran.r-project.org/package=mde) +[![CRAN_Release_Badge](https://www.r-pkg.org/badges/version-ago/mde)](https://CRAN.R-project.org/package=mde) [![Codecov test coverage](https://codecov.io/gh/Nelson-Gon/mde/branch/master/graph/badge.svg)](https://codecov.io/gh/Nelson-Gon/mde?branch=master) [![R-CMD-check](https://github.com/Nelson-Gon/mde/actions/workflows/devel-check.yaml/badge.svg)](https://github.com/Nelson-Gon/mde/actions/workflows/devel-check.yaml) @@ -93,6 +93,21 @@ na_summary(airquality,sort_by = "percent_complete") #> 6 Wind 0 153 100.00000 0.000000 ``` +If one would like to reset (drop) row names, then one can set +`row_names` to `TRUE` This may especially be useful in cases where +`rownames` are simply numeric and do not have much additional use. + +``` r +na_summary(airquality,sort_by = "percent_complete", reset_rownames = TRUE) +#> variable missing complete percent_complete percent_missing +#> 1 Ozone 37 116 75.81699 24.183007 +#> 2 Solar.R 7 146 95.42484 4.575163 +#> 3 Day 0 153 100.00000 0.000000 +#> 4 Month 0 153 100.00000 0.000000 +#> 5 Temp 0 153 100.00000 0.000000 +#> 6 Wind 0 153 100.00000 0.000000 +``` + To sort by `percent_missing` instead: ``` r diff --git a/README.rmd b/README.rmd index 50edf37..6a49d5e 100644 --- a/README.rmd +++ b/README.rmd @@ -86,7 +86,7 @@ devtools::install_github("Nelson-Gon/mde@develop") **Loading the package** -```{r} +```{r pkg_load} library(mde) @@ -105,7 +105,7 @@ library(mde) To get a simple missingness report, use `na_summary`: -```{r} +```{r na_summary_default} na_summary(airquality) @@ -114,10 +114,20 @@ na_summary(airquality) To sort this summary by a given column : -```{r} +```{r column_sort_na_summary} na_summary(airquality,sort_by = "percent_complete") +``` +If one would like to reset (drop) row names, then one can set `row_names` to +`TRUE` This may especially be useful in cases where `rownames` are simply +numeric and do not have much additional use. + + +```{r reset_rownames} + +na_summary(airquality,sort_by = "percent_complete", reset_rownames = TRUE) + ``` To sort by `percent_missing` instead: @@ -133,6 +143,7 @@ To sort the above in descending order: na_summary(airquality, sort_by="percent_missing", descending = TRUE) ``` + To exclude certain columns from the analysis: ```{r} @@ -147,7 +158,9 @@ To include or exclude via regex match: na_summary(airquality, regex_kind = "inclusion",pattern_type = "starts_with", pattern = "O|S") ``` ```{r} + na_summary(airquality, regex_kind = "exclusion",pattern_type = "regex", pattern = "^[O|S]") + ``` To get this summary by group: diff --git a/docs/articles/mde_vignette.html b/docs/articles/mde_vignette.html index 6832c6f..6e8dad1 100644 --- a/docs/articles/mde_vignette.html +++ b/docs/articles/mde_vignette.html @@ -86,7 +86,7 @@