From cf6b6a35fa56eac75f4a7a67a953f187694d232e Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 22 Jun 2024 11:39:57 +0200 Subject: [PATCH] fix --- NAMESPACE | 4 ++-- R/data_tabulate.R | 4 ++-- man/data_tabulate.Rd | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index cdaac1b63..2427deab0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,7 @@ # Generated by roxygen2: do not edit by hand +S3method(as.data.frame,dw_data_tabulates) +S3method(as.data.frame,dw_data_xtabulate) S3method(as.double,parameters_kurtosis) S3method(as.double,parameters_skewness) S3method(as.double,parameters_smoothness) @@ -227,8 +229,6 @@ export(column_as_rownames) export(contr.deviation) export(convert_na_to) export(convert_to_na) -export(data.frame.dw_data_tabulates) -export(data.frame.dw_data_xtabulate) export(data_addprefix) export(data_addsuffix) export(data_adjust) diff --git a/R/data_tabulate.R b/R/data_tabulate.R index 5bb5d521f..94e75e629 100644 --- a/R/data_tabulate.R +++ b/R/data_tabulate.R @@ -383,7 +383,7 @@ insight::print_md #' @rdname data_tabulate #' @export -data.frame.dw_data_tabulates <- function(x, add_total = FALSE, ...) { +as.data.frame.dw_data_tabulates <- function(x, add_total = FALSE, ...) { # extract variables of frequencies selected_vars <- lapply(x, function(i) attributes(i)$varname) # coerce to data frame, remove rownames @@ -409,7 +409,7 @@ data.frame.dw_data_tabulates <- function(x, add_total = FALSE, ...) { } #' @export -data.frame.dw_data_xtabulate <- data.frame.dw_data_tabulates +as.data.frame.dw_data_xtabulate <- as.data.frame.dw_data_tabulates #' @export diff --git a/man/data_tabulate.Rd b/man/data_tabulate.Rd index 2ea9b531e..59ca21ef4 100644 --- a/man/data_tabulate.Rd +++ b/man/data_tabulate.Rd @@ -4,7 +4,7 @@ \alias{data_tabulate} \alias{data_tabulate.default} \alias{data_tabulate.data.frame} -\alias{data.frame.dw_data_tabulates} +\alias{as.data.frame.dw_data_tabulates} \title{Create frequency and crosstables of variables} \usage{ data_tabulate(x, ...) @@ -37,7 +37,7 @@ data_tabulate(x, ...) ... ) -data.frame.dw_data_tabulates(x, add_total = FALSE, ...) +\method{as.data.frame}{dw_data_tabulates}(x, add_total = FALSE, ...) } \arguments{ \item{x}{A (grouped) data frame, a vector or factor.}