1
0
mirror of https://github.com/msberends/AMR.git synced 2025-09-05 05:29:41 +02:00

(v2.1.1.9279) fix documentation, add foreign S3 exports to functions

This commit is contained in:
2025-05-16 16:55:29 +02:00
parent 139f79d372
commit 38cebc1541
24 changed files with 292 additions and 239 deletions

13
R/sir.R
View File

@@ -1896,7 +1896,8 @@ print.sir_log <- function(x, ...) {
print(x, ...)
}
# will be exported using s3_register() in R/zzz.R
# this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::pillar_shaft, sir)
pillar_shaft.sir <- function(x, ...) {
out <- trimws(format(x))
if (has_colour()) {
@@ -1912,12 +1913,14 @@ pillar_shaft.sir <- function(x, ...) {
create_pillar_column(out, align = "left", width = 5)
}
# will be exported using s3_register() in R/zzz.R
# this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(pillar::type_sum, sir)
type_sum.sir <- function(x, ...) {
"sir"
}
# will be exported using s3_register() in R/zzz.R
# this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(cleaner::freq, sir)
freq.sir <- function(x, ...) {
x_name <- deparse(substitute(x))
x_name <- gsub(".*[$]", "", x_name)
@@ -1960,8 +1963,8 @@ freq.sir <- function(x, ...) {
}
}
# will be exported using s3_register() in R/zzz.R
# this prevents the requirement for putting the dependency in Imports:
#' @rawNamespace if(getRversion() >= "3.0.0") S3method(skimr::get_skimmers, sir)
get_skimmers.sir <- function(column) {
# get the variable name 'skim_variable'
name_call <- function(.data) {