diff --git a/DESCRIPTION b/DESCRIPTION index b532db8..f1f288c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,11 @@ Package: visdat Title: Preliminary Visualisation of Data -Version: 0.2.2.9100 +Version: 0.2.2.9200 Authors@R: c( person("Nicholas", "Tierney", role = c("aut", "cre"), email = "nicholas.tierney@gmail.com", comment = c(ORCID = "https://orcid.org/0000-0003-1460-8722")), - person("Sean", "Hughes", role = "rev"), + person("Sean", "Hughes", role = "rev", comment =c(ORCID = "https://orcid.org/0000-0002-9409-9405", "Sean Hughes reviewed the package for rOpenSci, see https://github.com/ropensci/onboarding/issues/87")), diff --git a/NEWS.md b/NEWS.md index a99e592..2fcf47c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,9 @@ -# visdat 0.2.2.9100 (2018/03/20) +# visdat 0.2.2.9200 (2018/03/20) -* fix visdat x axis lineup - [issue 57](https://github.com/ropensci/visdat/issues/57) +## Bugfixes + +* fix visdat x axis alignment - [issue 57](https://github.com/ropensci/visdat/issues/57) +* fix bug where the column percentage missing would print to be NA when it was exactly equal to 0.1% missing. - [issue 62](https://github.com/ropensci/visdat/issues/62) # visdat 0.2.2.9000 (2018/02/20) diff --git a/R/internals.R b/R/internals.R index 2e974c1..67556f3 100644 --- a/R/internals.R +++ b/R/internals.R @@ -73,11 +73,11 @@ label_col_missing_pct <- function(x, col_order_index){ # present everything in the right order - purrr::map_df(x, ~round(mean(is.na(.))*100,1))[col_order_index] %>% + purrr::map_df(x, ~round(mean(is.na(.))*100,2))[col_order_index] %>% purrr::map_chr(function(x){ dplyr::case_when( x == 0 ~ "0%", - x > 0.1 ~ paste0(x,"%"), + x >= 0.1 ~ paste0(x,"%"), x < 0.1 ~ "<0.1%" ) }) %>%