diff --git a/R/categorize.R b/R/categorize.R index 9f8dd7505..cd9015dda 100644 --- a/R/categorize.R +++ b/R/categorize.R @@ -363,7 +363,6 @@ categorize.grouped_df <- function(x, } - # tools -------------------- .equal_range <- function(x, range, n_groups, lowest = NULL) { diff --git a/R/data_arrange.R b/R/data_arrange.R index b64876a24..0cff97bd8 100644 --- a/R/data_arrange.R +++ b/R/data_arrange.R @@ -27,7 +27,6 @@ data_arrange <- function(data, select = NULL, safe = TRUE) { } - #' @export data_arrange.default <- function(data, select = NULL, safe = TRUE) { if (is.null(select) || length(select) == 0) { @@ -100,7 +99,6 @@ data_arrange.default <- function(data, select = NULL, safe = TRUE) { } - #' @export data_arrange.grouped_df <- function(data, select = NULL, safe = TRUE) { grps <- attr(data, "groups", exact = TRUE) diff --git a/R/data_match.R b/R/data_match.R index 6b522a0b8..e03f07dcd 100644 --- a/R/data_match.R +++ b/R/data_match.R @@ -182,7 +182,6 @@ data_match <- function(x, } - #' @rdname data_match #' @export data_filter <- function(x, ...) { diff --git a/R/data_read.R b/R/data_read.R index b24a5bdc2..5c4a9ba8a 100644 --- a/R/data_read.R +++ b/R/data_read.R @@ -127,7 +127,6 @@ data_read <- function(path, } - # helper ----------------------- .file_ext <- function(x) { @@ -156,7 +155,6 @@ data_read <- function(path, } - # process imported data from SPSS, SAS or Stata ----------------------- .post_process_imported_data <- function(x, convert_factors, verbose) { @@ -225,7 +223,6 @@ data_read <- function(path, } - # read functions ----------------------- .read_spss <- function(path, encoding, convert_factors, verbose, ...) { diff --git a/R/data_relocate.R b/R/data_relocate.R index 00bf3f38a..2abc6ea30 100644 --- a/R/data_relocate.R +++ b/R/data_relocate.R @@ -139,7 +139,6 @@ data_relocate <- function(data, } - #' @rdname data_relocate #' @export data_reorder <- function(data, diff --git a/R/data_rescale.R b/R/data_rescale.R index acfc08959..a13aea035 100644 --- a/R/data_rescale.R +++ b/R/data_rescale.R @@ -82,7 +82,6 @@ change_scale <- function(x, ...) { } - #' @export rescale.default <- function(x, verbose = TRUE, ...) { if (isTRUE(verbose)) { @@ -94,7 +93,6 @@ rescale.default <- function(x, verbose = TRUE, ...) { } - #' @rdname rescale #' @export rescale.numeric <- function(x, @@ -233,7 +231,6 @@ rescale.grouped_df <- function(x, } - #' @rdname rescale #' @export rescale.data.frame <- function(x, diff --git a/R/data_reverse.R b/R/data_reverse.R index 07641ec61..b89937375 100644 --- a/R/data_reverse.R +++ b/R/data_reverse.R @@ -115,7 +115,6 @@ reverse.numeric <- function(x, } - #' @export reverse.factor <- function(x, range = NULL, verbose = TRUE, ...) { # Warning if all NaNs @@ -195,7 +194,6 @@ reverse.factor <- function(x, range = NULL, verbose = TRUE, ...) { } - #' @export reverse.grouped_df <- function(x, select = NULL, @@ -254,7 +252,6 @@ reverse.grouped_df <- function(x, } - #' @rdname reverse #' @export reverse.data.frame <- function(x, diff --git a/R/data_tabulate.R b/R/data_tabulate.R index 621fabbb1..ae4b29aa4 100644 --- a/R/data_tabulate.R +++ b/R/data_tabulate.R @@ -690,8 +690,6 @@ print_md.datawizard_tables <- function(x, big_mark = NULL, ...) { } - - # tools -------------------- .table_header <- function(x, format = "text") { diff --git a/R/data_write.R b/R/data_write.R index 83457d64b..97163ffe0 100644 --- a/R/data_write.R +++ b/R/data_write.R @@ -114,8 +114,6 @@ data_write <- function(data, } - - # helper ------------------------------- diff --git a/R/describe_distribution.R b/R/describe_distribution.R index 64f6e29c1..972c8013e 100644 --- a/R/describe_distribution.R +++ b/R/describe_distribution.R @@ -499,8 +499,6 @@ describe_distribution.grouped_df <- function(x, } - - # methods ------------------ #' @export diff --git a/R/descriptives.R b/R/descriptives.R index 43479f697..4375a1283 100644 --- a/R/descriptives.R +++ b/R/descriptives.R @@ -153,8 +153,6 @@ coef_var.numeric <- function(x, mu = NULL, sigma = NULL, } - - # descriptives helpers .drop_na <- function(x) { diff --git a/R/normalize.R b/R/normalize.R index 3fd06a486..607607283 100644 --- a/R/normalize.R +++ b/R/normalize.R @@ -56,7 +56,6 @@ normalize <- function(x, ...) { } - #' @rdname normalize #' @export normalize.numeric <- function(x, include_bounds = TRUE, verbose = TRUE, ...) { diff --git a/R/ranktransform.R b/R/ranktransform.R index 2b956c30b..f48c07981 100644 --- a/R/ranktransform.R +++ b/R/ranktransform.R @@ -33,7 +33,6 @@ ranktransform <- function(x, ...) { } - #' @rdname ranktransform #' @export ranktransform.numeric <- function(x, @@ -89,16 +88,12 @@ ranktransform.numeric <- function(x, } - - #' @export ranktransform.factor <- function(x, ...) { x } - - #' @export ranktransform.grouped_df <- function(x, select = NULL, diff --git a/R/rescale_weights.R b/R/rescale_weights.R index 60d405c9d..ec0c75616 100644 --- a/R/rescale_weights.R +++ b/R/rescale_weights.R @@ -133,9 +133,6 @@ rescale_weights <- function(data, by, probability_weights, nest = FALSE) { } - - - # rescale weights, for one or more group variables ---------------------------- .rescale_weights <- function(x, group, probability_weights, n, weight_non_na) { @@ -172,7 +169,6 @@ rescale_weights <- function(data, by, probability_weights, nest = FALSE) { } - # rescale weights, for nested groups ---------------------------- .rescale_weights_nested <- function(x, group, probability_weights, n, weight_non_na) { diff --git a/R/select_nse.R b/R/select_nse.R index 766809b6c..a085a4ce3 100644 --- a/R/select_nse.R +++ b/R/select_nse.R @@ -199,11 +199,12 @@ # small helper, to avoid duplicated code .action_if_not_found <- function( - x, - columns, - matches, - verbose, - ifnotfound) { + x, + columns, + matches, + verbose, + ifnotfound +) { msg <- paste0( "Following variable(s) were not found: ", toString(x[is.na(matches)]) diff --git a/R/skewness_kurtosis.R b/R/skewness_kurtosis.R index 23ced0a04..af48f6ee0 100644 --- a/R/skewness_kurtosis.R +++ b/R/skewness_kurtosis.R @@ -227,7 +227,6 @@ skewness.default <- function(x, } - # Kurtosis ----------------------------------- @@ -432,7 +431,6 @@ summary.parameters_kurtosis <- function(object, test = FALSE, ...) { } - # bootstrapping ----------------------------------- .boot_skewness <- function(data, indices, remove_na, type) { diff --git a/R/smoothness.R b/R/smoothness.R index b45202b5f..6239cf715 100644 --- a/R/smoothness.R +++ b/R/smoothness.R @@ -100,8 +100,6 @@ smoothness.default <- function(x, } - - # bootstrapping ----------------------------------- .boot_smoothness <- function(data, indices, method, lag) { @@ -114,8 +112,6 @@ smoothness.default <- function(x, } - - # methods ----------------------------------------- #' @export diff --git a/R/standardize.R b/R/standardize.R index 27de92946..2ff8767a0 100644 --- a/R/standardize.R +++ b/R/standardize.R @@ -309,7 +309,6 @@ standardize.data.frame <- function(x, } - #' @export standardize.grouped_df <- function(x, select = NULL, @@ -382,9 +381,6 @@ standardize.grouped_df <- function(x, } - - - # Datagrid ---------------------------------------------------------------- #' @export diff --git a/R/standardize.models.R b/R/standardize.models.R index cf6062c78..75014379d 100644 --- a/R/standardize.models.R +++ b/R/standardize.models.R @@ -120,7 +120,6 @@ standardize.default <- function(x, } - ## ---- Z the RESPONSE? ---- # 1. Some models have special responses that should not be standardized. This # includes: @@ -158,7 +157,6 @@ standardize.default <- function(x, } - ## ---- DO NOT Z: ---- # 1. WEIGHTS: @@ -202,7 +200,6 @@ standardize.default <- function(x, } - ## ---- STANDARDIZE! ---- w <- insight::get_weights(x, remove_na = TRUE) @@ -255,9 +252,6 @@ standardize.default <- function(x, } - - - ## ---- ADD BACK VARS THAT WHERE NOT Z ---- if (length(dont_standardize)) { remaining_columns <- intersect(colnames(data), dont_standardize) @@ -265,9 +259,6 @@ standardize.default <- function(x, } - - - ## ---- UPDATE MODEL WITH Z DATA ---- on.exit(.update_failed()) @@ -447,9 +438,6 @@ standardize.biglm <- standardize.wbm # biglm doesn't regit the model to new data - it ADDs MORE data to the model. - - - # helper ---------------------------- # Find log-terms inside model formula, and return "clean" term names diff --git a/R/text_format.R b/R/text_format.R index 46cbf2ee0..f2522b1fe 100644 --- a/R/text_format.R +++ b/R/text_format.R @@ -102,7 +102,6 @@ text_paste <- function(text, text2 = NULL, sep = ", ", enclose = NULL, ...) { } - #' @rdname text_format #' @export text_remove <- function(text, pattern = "", ...) { diff --git a/R/to_numeric.R b/R/to_numeric.R index 3e75bccbd..b07c9eb59 100644 --- a/R/to_numeric.R +++ b/R/to_numeric.R @@ -280,7 +280,6 @@ to_numeric.character <- function(x, } - #' Convert to Numeric (if possible) #' #' Tries to convert vector to numeric if possible (if no warnings or errors). diff --git a/R/unstandardize.R b/R/unstandardize.R index d9af0c5ed..d601f0520 100644 --- a/R/unstandardize.R +++ b/R/unstandardize.R @@ -151,7 +151,6 @@ unstandardize.character <- function(x, ...) { } - #' @export unstandardize.grouped_df <- function(x, center = NULL, @@ -261,7 +260,6 @@ unstandardize.matrix <- function(x, unstandardize.array <- unstandardize.matrix - # Datagrid ---------------------------------------------------------------- #' @export diff --git a/R/utils-cols.R b/R/utils-cols.R index f8e07306e..85234729e 100644 --- a/R/utils-cols.R +++ b/R/utils-cols.R @@ -74,8 +74,6 @@ row_to_colnames <- function(x, row = 1, na_prefix = "x", verbose = TRUE) { } - - #' @rdname colnames #' @export colnames_to_row <- function(x, prefix = "x") { diff --git a/R/utils-rows.R b/R/utils-rows.R index 4fbcaeda4..746801289 100644 --- a/R/utils-rows.R +++ b/R/utils-rows.R @@ -79,7 +79,6 @@ column_as_rownames <- function(x, var = "rowname") { } - #' @rdname rownames #' @export #' @examples diff --git a/R/visualisation_recipe.R b/R/visualisation_recipe.R index 6db3ea4fb..8614b853a 100644 --- a/R/visualisation_recipe.R +++ b/R/visualisation_recipe.R @@ -78,7 +78,6 @@ print.visualisation_recipe <- function(x, ...) { } - #' @export plot.visualisation_recipe <- function(x, ...) { insight::check_if_installed("see") diff --git a/tests/testthat/test-attributes-grouped-df.R b/tests/testthat/test-attributes-grouped-df.R index 9a4c7e31a..24ba439ae 100644 --- a/tests/testthat/test-attributes-grouped-df.R +++ b/tests/testthat/test-attributes-grouped-df.R @@ -11,7 +11,6 @@ test_that("data_arrange, attributes preserved", { }) - # rescale ----------------------------------- test_that("rescale, attributes preserved", { @@ -22,7 +21,6 @@ test_that("rescale, attributes preserved", { }) - # center ----------------------------------- test_that("center, attributes preserved", { @@ -33,7 +31,6 @@ test_that("center, attributes preserved", { }) - # categorize ----------------------------------- test_that("categorize, attributes preserved", { @@ -44,7 +41,6 @@ test_that("categorize, attributes preserved", { }) - # standardize ----------------------------------- test_that("standardize, attributes preserved", { diff --git a/tests/testthat/test-attributes.R b/tests/testthat/test-attributes.R index df1ec0302..11cac77ee 100644 --- a/tests/testthat/test-attributes.R +++ b/tests/testthat/test-attributes.R @@ -16,7 +16,6 @@ test_that("data_filter, attributes preserved", { }) - # data_arrange ----------------------------------- test_that("data_arrange, attributes preserved", { @@ -27,7 +26,6 @@ test_that("data_arrange, attributes preserved", { }) - # data_match ----------------------------------- test_that("data_match, attributes preserved", { @@ -38,7 +36,6 @@ test_that("data_match, attributes preserved", { }) - # data_select ----------------------------------- test_that("data_select, attributes preserved", { @@ -49,7 +46,6 @@ test_that("data_select, attributes preserved", { }) - # data_group ----------------------------------- test_that("data_group, attributes preserved", { @@ -60,7 +56,6 @@ test_that("data_group, attributes preserved", { }) - # data_relocate ----------------------------------- test_that("data_relocate, attributes preserved", { @@ -71,7 +66,6 @@ test_that("data_relocate, attributes preserved", { }) - # data_remove ----------------------------------- test_that("data_remove, attributes preserved", { @@ -82,7 +76,6 @@ test_that("data_remove, attributes preserved", { }) - # data_reorder ----------------------------------- test_that("data_reorder, attributes preserved", { @@ -93,7 +86,6 @@ test_that("data_reorder, attributes preserved", { }) - # data_to_long ----------------------------------- test_that("data_to_long, attributes preserved", { @@ -104,7 +96,6 @@ test_that("data_to_long, attributes preserved", { }) - # to_numeric ----------------------------------- test_that("to_numeric, attributes preserved", { @@ -115,7 +106,6 @@ test_that("to_numeric, attributes preserved", { }) - # convert_to_na ----------------------------------- test_that("convert_to_na, attributes preserved", { @@ -130,7 +120,6 @@ test_that("convert_to_na, attributes preserved", { }) - # data_rename ----------------------------------- test_that("data_rename, attributes preserved", { @@ -141,7 +130,6 @@ test_that("data_rename, attributes preserved", { }) - # rescale ----------------------------------- test_that("rescale, attributes preserved", { @@ -152,7 +140,6 @@ test_that("rescale, attributes preserved", { }) - # center ----------------------------------- test_that("center, attributes preserved", { @@ -163,7 +150,6 @@ test_that("center, attributes preserved", { }) - # categorize ----------------------------------- test_that("categorize, attributes preserved", { @@ -174,7 +160,6 @@ test_that("categorize, attributes preserved", { }) - # change_code ----------------------------------- test_that("recode_values, attributes preserved", { @@ -185,7 +170,6 @@ test_that("recode_values, attributes preserved", { }) - # standardize ----------------------------------- test_that("standardize, attributes preserved", { diff --git a/tests/testthat/test-categorize.R b/tests/testthat/test-categorize.R index 30453d9ad..bbbc9a0ad 100644 --- a/tests/testthat/test-categorize.R +++ b/tests/testthat/test-categorize.R @@ -200,7 +200,6 @@ test_that("recode all NA", { }) - test_that("recode numeric", { expect_identical( categorize(mtcars$hp, split = c(100, 150)), diff --git a/tests/testthat/test-center.R b/tests/testthat/test-center.R index e7e347848..7c376e9fc 100644 --- a/tests/testthat/test-center.R +++ b/tests/testthat/test-center.R @@ -82,7 +82,6 @@ test_that("center works correctly with only one value", { }) - # with grouped data ------------------------------------------- test_that("center (grouped data)", { diff --git a/tests/testthat/test-convert_na_to.R b/tests/testthat/test-convert_na_to.R index 7d6e68132..c10742993 100644 --- a/tests/testthat/test-convert_na_to.R +++ b/tests/testthat/test-convert_na_to.R @@ -52,7 +52,6 @@ test_that("convert_na_to - numeric: returns original vector if 'replacement' not }) - # character -------------------------- test_that("convert_na_to - character: works", { @@ -109,9 +108,6 @@ test_that("convert_na_to - character: returns original vector if 'replacement' n }) - - - # factor -------------------------- test_that("convert_na_to - factor: works when 'replacement' is numeric ", { @@ -140,11 +136,6 @@ test_that("convert_na_to - factor: works when 'replacement' is character", { }) - - - - - # data frame -------------------------- test <- data.frame( @@ -417,7 +408,6 @@ test_that("convert_na_to - data frame: works when arg 'select' is a list", { }) - # preserve attributes -------------------------- test_that("data_rename preserves attributes", { diff --git a/tests/testthat/test-data_read.R b/tests/testthat/test-data_read.R index 15f1161d3..9fdac5455 100644 --- a/tests/testthat/test-data_read.R +++ b/tests/testthat/test-data_read.R @@ -21,7 +21,6 @@ test_that("data_read - csv", { }) - # csv ------------------------- test_that("data_read, skip_empty", { @@ -34,7 +33,6 @@ test_that("data_read, skip_empty", { }) - # tsv ------------------------- test_that("data_read - tsv", { @@ -57,7 +55,6 @@ test_that("data_read - tsv", { }) - # excel ------------------------- test_that("data_read - excel", { @@ -105,7 +102,6 @@ test_that("data_read - Stata file", { }) - # SAS file ----------------------------------- @@ -131,8 +127,6 @@ test_that("data_read - SAS file", { }) - - # RDS file, matrix, coercible ----------------------------------- test_that("data_read - RDS file, matrix, coercible", { @@ -154,7 +148,6 @@ test_that("data_read - RDS file, matrix, coercible", { }) - # RDS file, preserve class /types ----------------------------------- test_that("data_read - RDS file, preserve class", { @@ -177,7 +170,6 @@ test_that("data_read - RDS file, preserve class", { }) - # RData ----------------------------------- test_that("data_read - no warning for RData", { @@ -189,7 +181,6 @@ test_that("data_read - no warning for RData", { }) - # SPSS file ----------------------------------- test_that("data_read - SPSS file", { @@ -225,8 +216,6 @@ test_that("data_read - SPSS file", { }) - - # SPSS file 2 --------------------------------- test_that("data_read - SPSS file 2", { @@ -275,7 +264,6 @@ test_that("data_read - SPSS file 2", { }) - # zipped SPSS file ----------------------------------- test_that("data_read - zipped SPSS file", { @@ -302,7 +290,6 @@ test_that("data_read - zipped SPSS file", { }) - # SPSS file, many value labels ----------------------------------- test_that("data_read, convert many labels correctly", { @@ -423,8 +410,6 @@ test_that("data_read, convert many labels correctly", { }) - - # invalid file type ------------------------- test_that("data_read, no file extension", { diff --git a/tests/testthat/test-data_recode.R b/tests/testthat/test-data_recode.R index 0b6f0d312..e40f93108 100644 --- a/tests/testthat/test-data_recode.R +++ b/tests/testthat/test-data_recode.R @@ -23,7 +23,6 @@ test_that("recode numeric", { }) - # Date ----------------------- set.seed(123) @@ -34,7 +33,6 @@ test_that("recode date", { }) - # factor ----------------------- set.seed(123) @@ -92,7 +90,6 @@ test_that("recode factor", { }) - # character ----------------------- set.seed(123) @@ -108,7 +105,6 @@ test_that("recode character", { }) - # data frame ----------------------- set.seed(123) @@ -179,7 +175,6 @@ test_that("recode data.frame", { }) - # set recode pattern back to default -------------- options(data_recode_pattern = NULL) diff --git a/tests/testthat/test-data_relocate.R b/tests/testthat/test-data_relocate.R index 133332522..688d2fbaf 100644 --- a/tests/testthat/test-data_relocate.R +++ b/tests/testthat/test-data_relocate.R @@ -35,7 +35,6 @@ test_that("data_relocate works as expected", { }) - test_that("data_relocate select-helpers", { expect_identical( colnames(data_relocate(iris, select = starts_with("Sepal"), after = 5)), diff --git a/tests/testthat/test-data_rescale.R b/tests/testthat/test-data_rescale.R index 9caf3ee16..09890723a 100644 --- a/tests/testthat/test-data_rescale.R +++ b/tests/testthat/test-data_rescale.R @@ -44,7 +44,6 @@ test_that("rescale works as expected", { }) - test_that("rescale works with select helpers", { out <- rescale(iris, to = c(0, 1), select = c("Sepal.Width", "Sepal.Length")) expect_equal(head(out$Sepal.Width), c(0.625, 0.41667, 0.5, 0.45833, 0.66667, 0.79167), tolerance = 1e-3) diff --git a/tests/testthat/test-data_reverse.R b/tests/testthat/test-data_reverse.R index 794591904..386445f9a 100644 --- a/tests/testthat/test-data_reverse.R +++ b/tests/testthat/test-data_reverse.R @@ -178,9 +178,6 @@ test_that("reverse msg for unsupported", { }) - - - # Same tests with reverse_scale (alias) -------------------------- test_that("reverse_scale works with numeric", { @@ -354,8 +351,6 @@ test_that("reverse_scale select helpers", { }) - - # with grouped data ------------------------------------------- set.seed(123) diff --git a/tests/testthat/test-data_select.R b/tests/testthat/test-data_select.R index 6b78ec602..c81670b73 100644 --- a/tests/testthat/test-data_select.R +++ b/tests/testthat/test-data_select.R @@ -7,7 +7,6 @@ test_that("data_select checks for data frame", { }) - # select helpers --------------------- test_that("data_select works with select helpers", { @@ -33,7 +32,6 @@ test_that("data_select works with select helpers", { }) - # select helpers, negation --------------------- test_that("data_select works with negation of select helpers", { @@ -49,7 +47,6 @@ test_that("data_select works with negation of select helpers", { }) - # select-nse with function --------------------- test_that("data_select works with select-functions", { @@ -77,7 +74,6 @@ test_that("data_select works with select-functions", { }) - # select-nse with user-function --------------------- testfun <- function(i) { is.numeric(i) && mean(i, na.rm = TRUE) > 3.5 @@ -100,7 +96,6 @@ test_that("data_select works with user-defined select-functions", { }) - # select-nse with negation of functions --------------------- test_that("data_select works with negated select-functions", { @@ -128,7 +123,6 @@ test_that("data_select works with negated select-functions", { }) - # select-nse with ranges --------------------- test_that("data_select works with ranges", { @@ -144,7 +138,6 @@ test_that("data_select works with ranges", { }) - # select-nse with negated ranges --------------------- test_that("data_select works with negated ranges", { @@ -179,7 +172,6 @@ test_that("data_select works with negated ranges", { }) - # select-nse with formulas --------------------- test_that("data_select works with formulas", { @@ -195,7 +187,6 @@ test_that("data_select works with formulas", { }) - # select-nse, other cases --------------------- test_that("data_select works, other cases", { @@ -247,7 +238,6 @@ test_that("data_select works, other cases", { }) - # select-nse works when called from other function --------------------- test_that("data_select from other functions", { @@ -319,7 +309,6 @@ test_that("data_select from other functions", { }) - # preserve attributes -------------------------- test_that("data_select preserves attributes", { diff --git a/tests/testthat/test-data_tabulate.R b/tests/testthat/test-data_tabulate.R index 9848d42b9..74c3c2f23 100644 --- a/tests/testthat/test-data_tabulate.R +++ b/tests/testthat/test-data_tabulate.R @@ -178,7 +178,6 @@ test_that("data_tabulate print multiple, collapse", { }) - test_that("data_tabulate grouped data.frame", { skip_if_not_installed("poorman") data(efc, package = "datawizard") diff --git a/tests/testthat/test-data_to_factor.R b/tests/testthat/test-data_to_factor.R index e45423bd5..ed78fe2c5 100644 --- a/tests/testthat/test-data_to_factor.R +++ b/tests/testthat/test-data_to_factor.R @@ -79,7 +79,6 @@ test_that("to_factor regex", { }) - # SPSS file, many value labels ----------------------------------- skip_if_not_installed("httr") diff --git a/tests/testthat/test-data_to_long.R b/tests/testthat/test-data_to_long.R index ab8bf1ba2..6598e4154 100644 --- a/tests/testthat/test-data_to_long.R +++ b/tests/testthat/test-data_to_long.R @@ -124,8 +124,6 @@ test_that("data_to_long works - complex dataset", { }) - - test_that("data_to_long: arg 'cols' overrides 'select'", { skip_if_not_installed("psych") data <- psych::bfi @@ -256,10 +254,6 @@ test_that("data_to_long: error if no columns to reshape", { }) - - - - # EQUIVALENCE WITH TIDYR - PIVOT_LONGER ------------------------------------------- # Examples coming from: https://tidyr.tidyverse.org/articles/pivot.html#longer @@ -393,7 +387,6 @@ test_that("data_to_long equivalent to pivot_longer: ex 6", { }) - # tests coming from tidyr's repo # https://github.com/tidyverse/tidyr/blob/main/tests/testthat/test-pivot-long.R diff --git a/tests/testthat/test-data_to_wide.R b/tests/testthat/test-data_to_wide.R index d716ff222..293c0738d 100644 --- a/tests/testthat/test-data_to_wide.R +++ b/tests/testthat/test-data_to_wide.R @@ -40,7 +40,6 @@ test_that("data_to_wide works", { }) - test_that("data_to_wide, names_prefix works", { skip_if_not_installed("tidyr") @@ -188,7 +187,6 @@ test_that("data_to_wide, values_fill errors when length > 1", { }) - # EQUIVALENCE WITH TIDYR - PIVOT_WIDER ----------------------------------------------- @@ -466,7 +464,6 @@ test_that("data_to_wide, names_glue works", { }) - test_that("preserve date format", { skip_if_not_installed("tidyr") diff --git a/tests/testthat/test-data_write.R b/tests/testthat/test-data_write.R index fecdc4767..3293d5cdc 100644 --- a/tests/testthat/test-data_write.R +++ b/tests/testthat/test-data_write.R @@ -14,7 +14,6 @@ d <- data_filter(efc, 1:5) d$e42dep <- droplevels(d$e42dep) - # SPSS ------------------------------------- test_that("data_write, SPSS", { @@ -53,7 +52,6 @@ test_that("data_write, SPSS, mixed types of labelled vectors", { }) - # Stata ------------------------------------- test_that("data_write, Stata", { @@ -71,7 +69,6 @@ test_that("data_write, Stata", { }) - # csv ------------------------- test_that("data_write, CSV, keep numeric", { diff --git a/tests/testthat/test-describe_distribution.R b/tests/testthat/test-describe_distribution.R index dfa7bf617..398f0e300 100644 --- a/tests/testthat/test-describe_distribution.R +++ b/tests/testthat/test-describe_distribution.R @@ -46,7 +46,6 @@ test_that("describe_distribution - NULL for date", { }) - # data frame --------------------------------------- test_that("describe_distribution - data frame: works with basic data frame", { @@ -88,7 +87,6 @@ test_that("describe_distribution - data frame: works with range", { }) - # factor --------------------------------------- test_that("describe_distribution - factor", { @@ -98,7 +96,6 @@ test_that("describe_distribution - factor", { }) - # character --------------------------------------- test_that("describe_distribution - character", { @@ -108,7 +105,6 @@ test_that("describe_distribution - character", { }) - # list --------------------------------------- test_that("describe_distribution - list: works with basic list", { @@ -206,7 +202,6 @@ test_that("describe_distribution - list: works with range", { }) - # select ---------------------- test_that("describe_distribution - select", { @@ -225,7 +220,6 @@ test_that("describe_distribution - select", { }) - # select and grouped df ---------------------- test_that("describe_distribution - grouped df", { diff --git a/tests/testthat/test-labelled_data.R b/tests/testthat/test-labelled_data.R index 2e933e5dc..4caa35276 100644 --- a/tests/testthat/test-labelled_data.R +++ b/tests/testthat/test-labelled_data.R @@ -38,7 +38,6 @@ test_that("reverse, labels preserved", { }) - # data_merge ----------------------------------- test_that("data_merge, labels preserved", { @@ -55,7 +54,6 @@ test_that("data_merge, labels preserved", { }) - # data_extract ----------------------------------- test_that("data_extract, labels preserved", { @@ -80,7 +78,6 @@ test_that("data_extract, labels preserved", { }) - # categorize ----------------------------------- test_that("categorize, labels preserved", { @@ -99,7 +96,6 @@ test_that("categorize, labels preserved", { }) - # data_reorder ----------------------------------- test_that("data_reorder, labels preserved", { @@ -111,7 +107,6 @@ test_that("data_reorder, labels preserved", { }) - # data_remove ----------------------------------- test_that("data_remove, labels preserved", { @@ -123,7 +118,6 @@ test_that("data_remove, labels preserved", { }) - # data_rename ----------------------------------- test_that("data_rename, labels preserved", { @@ -150,7 +144,6 @@ test_that("data_rename, labels preserved", { }) - # data_addprefix ----------------------------------- test_that("data_addprefix, labels preserved", { @@ -170,7 +163,6 @@ test_that("data_addprefix, labels preserved", { }) - # data_suffix ----------------------------------- test_that("data_addsuffix, labels preserved", { @@ -190,7 +182,6 @@ test_that("data_addsuffix, labels preserved", { }) - # to_numeric ----------------------------------- test_that("to_numeric, labels preserved", { @@ -218,7 +209,6 @@ test_that("to_numeric, labels preserved", { }) - # data_match ----------------------------------- test_that("data_match, labels preserved", { @@ -249,7 +239,6 @@ test_that("data_match, labels preserved", { }) - # data_filter ----------------------------------- test_that("data_filter, labels preserved", { @@ -267,7 +256,6 @@ test_that("data_filter, labels preserved", { }) - # convert_to_na ----------------------------------- test_that("convert_to_na, labels preserved", { @@ -310,7 +298,6 @@ test_that("convert_to_na, labels preserved", { }) - # data_select ----------------------------------- test_that("data_select, labels preserved", { @@ -332,7 +319,6 @@ test_that("data_select, labels preserved", { }) - # recode_values ----------------------------------- test_that("recode_values, labels preserved", { @@ -348,7 +334,6 @@ test_that("recode_values, labels preserved", { }) - # slide ----------------------------------- test_that("slide, labels preserved", { @@ -370,7 +355,6 @@ test_that("slide, labels preserved", { }) - # to_factor ----------------------------------- test_that("to_factor, labels preserved", { diff --git a/tests/testthat/test-ranktransform.R b/tests/testthat/test-ranktransform.R index 6737d8496..5996ba4f3 100644 --- a/tests/testthat/test-ranktransform.R +++ b/tests/testthat/test-ranktransform.R @@ -52,7 +52,6 @@ test_that("ranktransform works with data frames", { }) - # with grouped data ------------------------------------------- test_that("ranktransform works with data frames (grouped data)", { @@ -85,7 +84,6 @@ test_that("ranktransform works with data frames (grouped data)", { }) - test_that("ranktransform works with data frames containing NAs (grouped data)", { skip_if_not_installed("poorman") diff --git a/tests/testthat/test-standardize_models.R b/tests/testthat/test-standardize_models.R index d61caf450..42abaf257 100644 --- a/tests/testthat/test-standardize_models.R +++ b/tests/testthat/test-standardize_models.R @@ -98,9 +98,6 @@ test_that("transformations", { }) - - - # W/ weights -------------------------------------------------------------- test_that("weights", { expect_warning(standardize(mtcars, weights = "xx")) @@ -158,7 +155,6 @@ test_that("weights + NA", { ) - m1 <- lm(Sepal.Length ~ Species + Petal.Width, data = iris, weights = weight_me)