Skip to content

Commit 97fd69d

Browse files
authored
Merge pull request #311 from njtierney/prepare-for-1-0-0-release-310
Prepare for 1.0.0 release
2 parents dcd327f + 2b61452 commit 97fd69d

40 files changed

+220
-344
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: naniar
22
Type: Package
33
Title: Data Structures, Summaries, and Visualisations for Missing Data
4-
Version: 0.6.1.9000
4+
Version: 1.0.0
55
Authors@R: c(
66
person("Nicholas", "Tierney",
77
role = c("aut", "cre"),

NAMESPACE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ S3method(miss_var_summary,default)
2222
S3method(miss_var_summary,grouped_df)
2323
S3method(miss_var_table,default)
2424
S3method(miss_var_table,grouped_df)
25+
S3method(recode_shadow,data.frame)
26+
S3method(recode_shadow,grouped_df)
2527
S3method(replace_with_na,data.frame)
2628
S3method(shadow_shift,"NULL")
2729
S3method(shadow_shift,character)
@@ -139,7 +141,6 @@ export(shade)
139141
export(shadow_long)
140142
export(shadow_shift)
141143
export(stat_miss_point)
142-
export(to_basic.GeomMissPoint)
143144
export(unbind_data)
144145
export(unbind_shadow)
145146
export(vis_miss)

NEWS.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
# naniar 0.6.1.9000
1+
# naniar 1.0.0
2+
3+
Version 1.0.0 of naniar is to signify that this release is associated with
4+
the publication of the associated JSS paper, <doi:10.18637/jss.v105.i07>.
5+
There are also a few small changes that have been implemented in this release,
6+
which are described below.
7+
8+
There is still a lot to do in naniar, and this release does not signify that
9+
there are no changes upcoming, more so to establish that this is a stable
10+
release, and that any changes upcoming will go through a more formal deprecation
11+
process and so on.
212

313
## New
414

R/add-cols.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ add_label_missings <- function(data,
269269
#' @param complete character character a label for when values are complete - defaults to "Not Missing"
270270
#'
271271
#' @return "Missing" or "Not Missing"
272+
#' @keywords internal
273+
#' @noRd
272274
#'
273275
label_shadow <- function(data,
274276
...,

R/data-pedestrian.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' Melbourne: Birrarung Marr, Bourke Street Mall, Flagstaff station, and
55
#' Spencer St-Collins St (south), recorded from January 1st 2016 at 00:00:00
66
#' to December 31st 2016 at 23:00:00. The data is made free and publicly
7-
#' available from \url{https://data.melbourne.vic.gov.au/Transport-Movement/Pedestrian-volume-updated-monthly-/b2ak-trbp}
7+
#' available from \url{https://data.melbourne.vic.gov.au/explore/dataset/pedestrian-counting-system-monthly-counts-per-hour/information/}
88
#'
99
#' @format A tibble with 37,700 rows and 9 variables:
1010
#' \describe{
@@ -24,7 +24,7 @@
2424
#' @name pedestrian
2525
#' @docType data
2626
#' @usage data(pedestrian)
27-
#' @source \url{https://data.melbourne.vic.gov.au/Transport-Movement/Pedestrian-volume-updated-monthly-/b2ak-trbp}
27+
#' @source \url{https://data.melbourne.vic.gov.au/explore/dataset/pedestrian-counting-system-monthly-counts-per-hour/information/}
2828
#' @keywords datasets
2929
#'
3030
#' @examples

R/geom2plotly.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' @param p a ggplot2 object (the conversion may depend on scales, for
1313
#' instance).
1414
#' @param ... currently ignored
15-
#' @export
15+
#' @keywords internal
1616
to_basic.GeomMissPoint <- function(data,
1717
prestats_data,
1818
layout,

R/mcar-test.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#' 1198--1202. \doi{10.1080/01621459.1988.10478722}.
2222
#'
2323
#' @note Code is adapted from LittleMCAR() in the now-orphaned {BaylorEdPsych}
24-
#' package: https://rdrr.io/cran/BaylorEdPsych/man/LittleMCAR.html. Some of
25-
#' code is adapted from Eric Stemmler - <https://web.archive.org/web/20201120030409/https://stats-bayes.com/post/2020/08/14/r-function-for-little-s-test-for-data-missing-completely-at-random/>
24+
#' package: \url{https://rdrr.io/cran/BaylorEdPsych/man/LittleMCAR.html}. Some of
25+
#' code is adapted from Eric Stemmler: \url{https://web.archive.org/web/20201120030409/https://stats-bayes.com/post/2020/08/14/r-function-for-little-s-test-for-data-missing-completely-at-random/}
2626
#' using Maximum likelihood estimation from {norm}.
2727
#'
2828
#' @author Andrew Heiss, \email{[email protected]}

R/shade.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#' @param extra_levels the extra levels to give to `shade` objects, such as "broken_machine" and so on, which get converted into "NA_broken_machine".
55
#'
66
#' @return a new shade, which is built upon a factor
7+
#' @keywords internal
8+
#' @noRd
79
new_shade <- function(x, extra_levels = NULL){
810

911
if (!is.factor(x)) {

R/shadow-recode.R

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#'
2929
#' # test that this breaks
3030
#' # shadow_expand_relevel(airquality, "weee")
31+
#' @keywords internal
32+
#' @noRd
3133
shadow_expand_relevel <- function(.var, suffix){
3234

3335
# create level
@@ -78,7 +80,8 @@ shadow_expand_relevel <- function(.var, suffix){
7880
#'# update_shadow(dfs, "weee")
7981
#'# update_shadow(dfs, "weee") %>% what_levels()
8082
#' }
81-
#'
83+
#'@keywords internal
84+
#'@noRd
8285
update_shadow <- function(data, suffix) {
8386

8487
class_of_cols <- purrr::map(data,class)
@@ -152,6 +155,7 @@ update_shadow <- function(data, suffix) {
152155
#'
153156
#' @return a dataframe with altered shadows
154157
#' @export
158+
#' @rdname recode_shadow
155159
#'
156160
#' @examples
157161
#'
@@ -176,6 +180,12 @@ recode_shadow <- function(data, ...){
176180

177181
test_if_null(data)
178182
test_if_any_shade(data)
183+
UseMethod("recode_shadow")
184+
}
185+
186+
#' @name recode_shadow
187+
#' @export
188+
recode_shadow.data.frame <- function(data, ...){
179189

180190
formulas <- rlang::dots_list(...)
181191

@@ -234,3 +244,9 @@ recode_shadow <- function(data, ...){
234244

235245
shadow_recoded
236246
}
247+
248+
#' @name recode_shadow
249+
#' @export
250+
recode_shadow.grouped_df <- function(data, ...){
251+
group_by_fun(data, .fun = recode_shadow, ...)
252+
}

R/utils.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ rlang::are_na
1919
#' @param ... additional arguments to be passed to map
2020
#'
2121
#' @return a dataframe with the function applied to each group
22-
#'
22+
#' @keywords internal
23+
#' @noRd
2324
#' @examples
2425
#'
2526
#' \dontrun{
@@ -52,6 +53,8 @@ group_by_fun <- function(data,.fun, ...){
5253
#' my_test <- NULL
5354
#' test_if_null(my_test)
5455
#' }
56+
#' @keywords internal
57+
#' @noRd
5558
test_if_null <- function(x){
5659

5760
# test for null
@@ -74,6 +77,8 @@ test_if_null <- function(x){
7477
#' #fail
7578
#' test_if_missing()
7679
#' }
80+
#' @keywords internal
81+
#' @noRd
7782
test_if_missing <- function(x){
7883

7984
# test for null
@@ -97,6 +102,8 @@ test_if_missing <- function(x){
97102
#' test_if_dataframe(my_test)
98103
#' }
99104
#'
105+
#' @keywords internal
106+
#' @noRd
100107
test_if_dataframe <- function(x){
101108
# test for dataframe
102109
if (!inherits(x, "data.frame")) {
@@ -152,6 +159,8 @@ add_span_counter <- function(data, span_size) {
152159
#' @param x data.frame, usually
153160
#'
154161
#' @return a list containing the levels of everything
162+
#' @keywords internal
163+
#' @noRd
155164
what_levels <- function(x) purrr::map(x, levels)
156165

157166
quo_to_shade <- function(...){

0 commit comments

Comments
 (0)