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
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bregr
Title: Easy and Efficient Batch Processing of Regression Models
Version: 1.3.2
Version: 1.4.0
Authors@R: c(
person("Shixiang", "Wang", , "w_shixiang@163.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9855-7357")),
Expand Down Expand Up @@ -50,7 +50,7 @@ Suggests:
lme4,
merDeriv,
parallel,
qs,
qs2,
rmarkdown,
testthat (>= 3.0.0),
UCSCXenaShiny,
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Generated by roxygen2: do not edit by hand

S3method(base::print,br_diagnostics)
S3method(print,breg_comparison)
export(br_avail_method_config)
export(br_avail_methods)
export(br_avail_methods_use_exp)
export(br_compare_models)
export(br_diagnose)
export(br_get_config)
export(br_get_data)
Expand All @@ -30,6 +32,7 @@ export(br_show_fitted_line)
export(br_show_fitted_line_2d)
export(br_show_forest)
export(br_show_forest_circle)
export(br_show_forest_comparison)
export(br_show_forest_ggstats)
export(br_show_forest_ggstatsplot)
export(br_show_nomogram)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# bregr 1.4.0

- Replaced the deprecated package `qs` with `qs2`.

# bregr 1.3.2

- Checked with `devtools::check(env_vars = c('_R_CHECK_DEPENDS_ONLY_' = "true"))` and fixed reported check issues.
Expand Down
4 changes: 2 additions & 2 deletions R/02-pipeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ runner_ <- function(m, data, dots, opts = NULL) {
}

if (isTRUE(as.logical(getOption("bregr.save_model", default = FALSE)))) {
rlang::check_installed(c("ids", "qs"))
rlang::check_installed(c("ids", "qs2"))
md_path <- getOption("bregr.path", default = "")
if (md_path == "") {
if (requireNamespace("fs", quietly = TRUE)) {
Expand Down Expand Up @@ -560,7 +560,7 @@ runner_ <- function(m, data, dots, opts = NULL) {
} else {
md_file <- file.path(md_path, paste0(dg, ".qs"))
}
qs::qsave(model, file = md_file)
qs2::qs_save(model, file = md_file)
model <- md_file
}

Expand Down
8 changes: 4 additions & 4 deletions R/03-accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ br_get_models <- function(obj, idx = NULL, auto_drop = TRUE) {
if (len > 1000) {
cli::cli_inform("directly retrieve >1000 models may resource-consuming, subsetting with {.arg idx} is more recommended")
}
rlang::check_installed("qs")
mds <- map(mds, qs::qread)
rlang::check_installed("qs2")
mds <- map(mds, qs2::qs_read)
}
} else {
if (is.numeric(idx)) {
Expand All @@ -142,8 +142,8 @@ br_get_models <- function(obj, idx = NULL, auto_drop = TRUE) {

mds <- mds[idx]
if (!insight::is_model(mds[[1]]) && requireNamespace("fs", quietly = TRUE) && fs::is_file(mds[[1]])) {
rlang::check_installed("qs")
mds <- map(mds, qs::qread)
rlang::check_installed("qs2")
mds <- map(mds, qs2::qs_read)
}
if (length(idx) == 1 && auto_drop) mds <- mds[[1]]
}
Expand Down
Loading