Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ License: MIT + file LICENSE
URL: https://easystats.github.io/datawizard/
BugReports: https://github.com/easystats/datawizard/issues
Depends:
R (>= 3.6)
R (>= 4.0)
Imports:
insight (>= 1.0.0),
stats,
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

BREAKING CHANGES AND DEPRECATIONS

* *datawizard* now requires R >= 4.0 (#515).

* Argument `drop_na` in `data_match()` is deprecated now. Please use
`remove_na` instead.

Expand Down
1 change: 0 additions & 1 deletion R/categorize.R
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ categorize.grouped_df <- function(x,
}



# tools --------------------

.equal_range <- function(x, range, n_groups, lowest = NULL) {
Expand Down
2 changes: 0 additions & 2 deletions R/data_arrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion R/data_match.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ data_match <- function(x,
}



#' @rdname data_match
#' @export
data_filter <- function(x, ...) {
Expand Down
3 changes: 0 additions & 3 deletions R/data_read.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ data_read <- function(path,
}



# helper -----------------------

.file_ext <- function(x) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -225,7 +223,6 @@ data_read <- function(path,
}



# read functions -----------------------

.read_spss <- function(path, encoding, convert_factors, verbose, ...) {
Expand Down
1 change: 0 additions & 1 deletion R/data_relocate.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ data_relocate <- function(data,
}



#' @rdname data_relocate
#' @export
data_reorder <- function(data,
Expand Down
3 changes: 0 additions & 3 deletions R/data_rescale.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ change_scale <- function(x, ...) {
}



#' @export
rescale.default <- function(x, verbose = TRUE, ...) {
if (isTRUE(verbose)) {
Expand All @@ -94,7 +93,6 @@ rescale.default <- function(x, verbose = TRUE, ...) {
}



#' @rdname rescale
#' @export
rescale.numeric <- function(x,
Expand Down Expand Up @@ -233,7 +231,6 @@ rescale.grouped_df <- function(x,
}



#' @rdname rescale
#' @export
rescale.data.frame <- function(x,
Expand Down
3 changes: 0 additions & 3 deletions R/data_reverse.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ reverse.numeric <- function(x,
}



#' @export
reverse.factor <- function(x, range = NULL, verbose = TRUE, ...) {
# Warning if all NaNs
Expand Down Expand Up @@ -195,7 +194,6 @@ reverse.factor <- function(x, range = NULL, verbose = TRUE, ...) {
}



#' @export
reverse.grouped_df <- function(x,
select = NULL,
Expand Down Expand Up @@ -254,7 +252,6 @@ reverse.grouped_df <- function(x,
}



#' @rdname reverse
#' @export
reverse.data.frame <- function(x,
Expand Down
2 changes: 0 additions & 2 deletions R/data_tabulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,6 @@ print_md.datawizard_tables <- function(x, big_mark = NULL, ...) {
}




# tools --------------------

.table_header <- function(x, format = "text") {
Expand Down
2 changes: 0 additions & 2 deletions R/data_write.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ data_write <- function(data,
}




# helper -------------------------------


Expand Down
2 changes: 0 additions & 2 deletions R/describe_distribution.R
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,6 @@ describe_distribution.grouped_df <- function(x,
}




# methods ------------------

#' @export
Expand Down
2 changes: 0 additions & 2 deletions R/descriptives.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ coef_var.numeric <- function(x, mu = NULL, sigma = NULL,
}




# descriptives helpers

.drop_na <- function(x) {
Expand Down
1 change: 0 additions & 1 deletion R/normalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ normalize <- function(x, ...) {
}



#' @rdname normalize
#' @export
normalize.numeric <- function(x, include_bounds = TRUE, verbose = TRUE, ...) {
Expand Down
5 changes: 0 additions & 5 deletions R/ranktransform.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ranktransform <- function(x, ...) {
}



#' @rdname ranktransform
#' @export
ranktransform.numeric <- function(x,
Expand Down Expand Up @@ -89,16 +88,12 @@ ranktransform.numeric <- function(x,
}




#' @export
ranktransform.factor <- function(x, ...) {
x
}




#' @export
ranktransform.grouped_df <- function(x,
select = NULL,
Expand Down
4 changes: 0 additions & 4 deletions R/rescale_weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
11 changes: 6 additions & 5 deletions R/select_nse.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)])
Expand Down
2 changes: 0 additions & 2 deletions R/skewness_kurtosis.R
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ skewness.default <- function(x,
}



# Kurtosis -----------------------------------


Expand Down Expand Up @@ -432,7 +431,6 @@ summary.parameters_kurtosis <- function(object, test = FALSE, ...) {
}



# bootstrapping -----------------------------------

.boot_skewness <- function(data, indices, remove_na, type) {
Expand Down
4 changes: 0 additions & 4 deletions R/smoothness.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ smoothness.default <- function(x,
}




# bootstrapping -----------------------------------

.boot_smoothness <- function(data, indices, method, lag) {
Expand All @@ -114,8 +112,6 @@ smoothness.default <- function(x,
}




# methods -----------------------------------------

#' @export
Expand Down
4 changes: 0 additions & 4 deletions R/standardize.R
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ standardize.data.frame <- function(x,
}



#' @export
standardize.grouped_df <- function(x,
select = NULL,
Expand Down Expand Up @@ -382,9 +381,6 @@ standardize.grouped_df <- function(x,
}





# Datagrid ----------------------------------------------------------------

#' @export
Expand Down
12 changes: 0 additions & 12 deletions R/standardize.models.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ standardize.default <- function(x,
}



## ---- Z the RESPONSE? ----
# 1. Some models have special responses that should not be standardized. This
# includes:
Expand Down Expand Up @@ -158,7 +157,6 @@ standardize.default <- function(x,
}



## ---- DO NOT Z: ----

# 1. WEIGHTS:
Expand Down Expand Up @@ -202,7 +200,6 @@ standardize.default <- function(x,
}



## ---- STANDARDIZE! ----

w <- insight::get_weights(x, remove_na = TRUE)
Expand Down Expand Up @@ -255,19 +252,13 @@ standardize.default <- function(x,
}





## ---- ADD BACK VARS THAT WHERE NOT Z ----
if (length(dont_standardize)) {
remaining_columns <- intersect(colnames(data), dont_standardize)
data_std <- cbind(data[, remaining_columns, drop = FALSE], data_std)
}





## ---- UPDATE MODEL WITH Z DATA ----
on.exit(.update_failed())

Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion R/text_format.R
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ text_paste <- function(text, text2 = NULL, sep = ", ", enclose = NULL, ...) {
}



#' @rdname text_format
#' @export
text_remove <- function(text, pattern = "", ...) {
Expand Down
1 change: 0 additions & 1 deletion R/to_numeric.R
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 0 additions & 2 deletions R/unstandardize.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ unstandardize.character <- function(x, ...) {
}



#' @export
unstandardize.grouped_df <- function(x,
center = NULL,
Expand Down Expand Up @@ -261,7 +260,6 @@ unstandardize.matrix <- function(x,
unstandardize.array <- unstandardize.matrix



# Datagrid ----------------------------------------------------------------

#' @export
Expand Down
2 changes: 0 additions & 2 deletions R/utils-cols.R
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
1 change: 0 additions & 1 deletion R/utils-rows.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ column_as_rownames <- function(x, var = "rowname") {
}



#' @rdname rownames
#' @export
#' @examples
Expand Down
1 change: 0 additions & 1 deletion R/visualisation_recipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ print.visualisation_recipe <- function(x, ...) {
}



#' @export
plot.visualisation_recipe <- function(x, ...) {
insight::check_if_installed("see")
Expand Down
Loading