Skip to content

Commit

Permalink
Update docs after #33 #43
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-Gon committed Jan 31, 2022
1 parent 21b783e commit 1bd9d71
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 76 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
mde: Missing Data Explorer
================
2021-09-19
2022-01-31

<!-- badges: start -->

[![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)
Expand Down Expand Up @@ -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
Expand Down
19 changes: 16 additions & 3 deletions README.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ devtools::install_github("Nelson-Gon/mde@develop")

**Loading the package**

```{r}
```{r pkg_load}
library(mde)
Expand All @@ -105,7 +105,7 @@ library(mde)
To get a simple missingness report, use `na_summary`:


```{r}
```{r na_summary_default}
na_summary(airquality)
Expand All @@ -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:
Expand All @@ -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}
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/mde_vignette.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 27 additions & 16 deletions docs/articles/missingness.html

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion docs/articles/recoding.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bd9d71

Please sign in to comment.