Skip to content

Commit

Permalink
merge 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Drago Plecko authored and Drago Plecko committed Dec 29, 2023
2 parents b840813 + 3c72261 commit 4be4f5d
Show file tree
Hide file tree
Showing 57 changed files with 134 additions and 93 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ S3method(as_item,item)
S3method(as_item,itm)
S3method(as_item,list)
S3method(as_item,rec_cncpt)
S3method(as_ptype,data.frame)
S3method(as_ptype,data.table)
S3method(as_ptype,default)
S3method(as_ptype,id_tbl)
S3method(as_src_cfg,default)
Expand Down Expand Up @@ -251,6 +253,7 @@ S3method(set_callback,default)
S3method(set_callback,itm)
S3method(set_target,cncpt)
S3method(set_target,concept)
S3method(set_target,default)
S3method(set_target,item)
S3method(set_target,itm)
S3method(setup_src_data,character)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
* MIMIC-IV (`miiv` in `ricu`) version bumped to 2.2
* fixed the usage of `round()` and `trunc()`; both replaced by `floor()` throughout

# ricu 0.5.6

* maintenance release: fixes non-character numeric version input issues
>>>>>>> 3c72261c4f049b49e7040a588b28eeb974a2f177
# ricu 0.5.5

* maintenance release: fixes an issue introduced by pillar 1.9.0 via an update
Expand Down
1 change: 0 additions & 1 deletion R/assertions.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' @importFrom assertthat see_if on_failure<- validate_that
#' @importFrom assertthat is.string is.flag is.dir is.count is.scalar
#' @importFrom assertthat has_name has_attr are_equal is.number
Expand Down
1 change: 0 additions & 1 deletion R/callback-cncpt.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

collect_dots <- function(concepts, interval, ..., merge_dat = FALSE) {

assert_that(is.character(concepts))
Expand Down
1 change: 0 additions & 1 deletion R/callback-itm.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

vent_flag <- function(x, val_var, ...) {
x <- x[as.logical(get(val_var)), ]
set(x, j = c(index_var(x), val_var),
Expand Down
1 change: 0 additions & 1 deletion R/callback-scores.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' SIRS score label
#'
#' The SIRS (Systemic Inflammatory Response Syndrome) score is a commonly used
Expand Down
1 change: 0 additions & 1 deletion R/callback-sep3.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Sepsis 3 label
#'
#' The sepsis 3 label consists of a suspected infection combined with an acute
Expand Down
1 change: 0 additions & 1 deletion R/callback-sofa.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' SOFA score label
#'
#' The SOFA (Sequential Organ Failure Assessment) score is a commonly used
Expand Down
1 change: 0 additions & 1 deletion R/concept-load.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Load concept data
#'
#' Concept objects are used in `ricu` as a way to specify how a clinical
Expand Down
2 changes: 1 addition & 1 deletion R/concept-utils.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Data items
#'
#' Item objects are used in `ricu` as a way to specify how individual data
Expand Down Expand Up @@ -806,6 +805,7 @@ set_target.concept <- function(x, target) {
new_concept(lapply(x, set_target, target))
}

#' @export
set_target.default <- function(x, target) stop_generic(x, .Generic)

#' @rdname item_utils
Expand Down
1 change: 0 additions & 1 deletion R/config-class.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Internal utilities for working with data source configurations
#'
#' Data source configuration objects store information on data sources used
Expand Down
1 change: 0 additions & 1 deletion R/config-utils.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' @param x Object to coerce/query
#'
#' @rdname src_cfg
Expand Down
1 change: 0 additions & 1 deletion R/data-env.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' ICU datasets
#'
#' The [Laboratory for Computational Physiology
Expand Down
1 change: 0 additions & 1 deletion R/data-load.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Low level functions for loading data
#'
#' Data loading involves a cascade of S3 generic functions, which can
Expand Down
1 change: 0 additions & 1 deletion R/data-utils.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Data loading utilities
#'
#' Two important tools for smoothing out differences among used datasets are
Expand Down
1 change: 0 additions & 1 deletion R/ricu.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' @keywords internal
#' @importFrom data.table setattr setcolorder set setnames setorderv
#' @importFrom data.table setDT setDF fifelse rbindlist data.table
Expand Down
1 change: 0 additions & 1 deletion R/setup-attach.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Data attach utilities
#'
#' Making a dataset available to `ricu` consists of 3 steps: downloading
Expand Down
3 changes: 1 addition & 2 deletions R/setup-download.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Data download utilities
#'
#' Making a dataset available to `ricu` consists of 3 steps: downloading
Expand Down Expand Up @@ -228,7 +227,7 @@ download_src.aumc_cfg <- function(x, data_dir = src_data_dir(x),
fil <- file.path(tmp, name)

if (isTRUE(verbose)) {
prg <- progress_init(size, msg = "Donwloading `aumc` data",
prg <- progress_init(size, msg = "Downloading `aumc` data",
what = FALSE)
} else {
prg <- FALSE
Expand Down
1 change: 0 additions & 1 deletion R/setup-import.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Data import utilities
#'
#' Making a dataset available to `ricu` consists of 3 steps: downloading
Expand Down
1 change: 0 additions & 1 deletion R/tbl-base.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' @export
`[.id_tbl` <- function(x, ...) wrap_ptype(as_ptype(x), NextMethod())

Expand Down
5 changes: 2 additions & 3 deletions R/tbl-class.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Tabular ICU data classes
#'
#' In order to simplify handling or tabular ICU data, `ricu` provides
Expand Down Expand Up @@ -636,11 +635,11 @@ as_ptype.id_tbl <- function(x) {
reclass_tbl(as.data.table(lapply(x, `[`, 0L)[meta_vars(x)]), x)
}

#' @method reclass_tbl data.table
#' @method as_ptype data.table
#' @export
as_ptype.data.table <- function(x) data.table()

#' @method reclass_tbl data.frame
#' @method as_ptype data.frame
#' @export
as_ptype.data.frame <- function(x) data.frame()

Expand Down
1 change: 0 additions & 1 deletion R/tbl-utils.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' ICU class meta data utilities
#'
#' The two data classes `id_tbl` and `ts_tbl`, used by `ricu` to represent ICU
Expand Down
1 change: 0 additions & 1 deletion R/utils-cli.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

is_interactive <- function() {
!isTRUE(getOption('knitr.in.progress')) && interactive()
}
Expand Down
1 change: 0 additions & 1 deletion R/utils-export.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Read and write utilities
#'
#' Support for reading from and writing to pipe separated values (`.psv`)
Expand Down
1 change: 0 additions & 1 deletion R/utils-file.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' File system utilities
#'
#' Determine the location where to place data meant to persist between
Expand Down
1 change: 0 additions & 1 deletion R/utils-misc.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

agg_or_na <- function(agg_fun) {
function(x) {
if (all(is.na(x))) return(x[1L])
Expand Down
3 changes: 2 additions & 1 deletion R/utils-ts.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#' Time series utility functions
#'
#' ICU data as handled by `ricu` is mostly comprised of time series data and as
Expand Down Expand Up @@ -64,6 +63,7 @@
#' `has_gaps()`/`has_no_gaps()`/`is_regular()`, which return logical flags.
#'
#' @examples
#' if (FALSE) {
#' tbl <- ts_tbl(x = 1:5, y = hours(1:5), z = hours(2:6), val = rnorm(5),
#' index_var = "y")
#' exp <- expand(tbl, "y", "z", step_size = 1L, new_index = "y",
Expand All @@ -89,6 +89,7 @@
#' tbl[6, 2] <- hours(2)
#' has_no_gaps(tbl)
#' is_regular(tbl)
#' }
#'
#' @rdname ts_utils
#' @export
Expand Down
1 change: 0 additions & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.onLoad <- function(libname, pkgname) { # nocov start

fix_base_fun <- function(fun, fix) {
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# [ricu](https://eth-mds.github.io/ricu/)
Expand Down
1 change: 0 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

title: ICU data with R

url: https://eth-mds.github.io/ricu
Expand Down
3 changes: 1 addition & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@

0 errors | 0 warnings | 0 notes

* Maintenance release (fixes an issue introduced by pillar 1.9.0 via an update
to 0.2.0 of prt)
* Maintenance release (fixes non-character numeric version input issues)
58 changes: 36 additions & 22 deletions man/change_id.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4be4f5d

Please sign in to comment.