Skip to content

Commit

Permalink
Log_trace for ToyData
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristinaSchmidt1 committed Nov 14, 2024
1 parent d01f965 commit ade2c4c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions R/ToyData.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#' @importFrom readr read_csv cols
#' @importFrom magrittr %>% extract2
#' @importFrom tibble column_to_rownames
#' @importFrom logger log_trace
#'
#' @export
#'
Expand All @@ -71,11 +72,9 @@ ToyData <- function(Dataset) {

#Load dataset:
if (!Dataset %in% names(datasets)) {
stop(sprintf(
"No such dataset: `%s`. Available datasets: %s",
Dataset,
paste(names(datasets), collapse = ", ")
))
message <- sprintf("No such dataset: `%s`. Available datasets: %s", Dataset, paste(names(datasets), collapse = ", "))
logger::log_trace(paste("Error ", message, sep=""))
stop(message)
}

datasets %>%
Expand Down

0 comments on commit ade2c4c

Please sign in to comment.