Skip to content

Commit

Permalink
Update NAMESPACE imports and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosbosse authored and seabbs committed Jan 4, 2024
1 parent 15a9909 commit 5c7bdb9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ importFrom(data.table,melt)
importFrom(data.table,nafill)
importFrom(data.table,rbindlist)
importFrom(data.table,setDT)
importFrom(data.table,setattr)
importFrom(data.table,setcolorder)
importFrom(data.table,setnames)
importFrom(ggdist,geom_lineribbon)
Expand Down
6 changes: 0 additions & 6 deletions R/get_-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ get_metrics <- function(scores) {
#' [get_protected_columns()] as well as the names of the metrics that were
#' specified during scoring, if any.
#' @inheritParams validate_forecast
#' @param check_conflict Whether or not to check whether there is a conflict
#' between a stored attribute and the inferred forecast unit. When you create
#' a forecast object, the forecast unit is stored as an attribute. If you
#' later change the columns of the data, the forecast unit as inferred from the
#' data might change compared to the stored attribute. Should this result in a
#' warning? Defaults to FALSE.
#' @return A character vector with the column names that define the unit of
#' a single forecast
#' @export
Expand Down
13 changes: 8 additions & 5 deletions R/score.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ score.default <- function(data, ...) {
}

#' @importFrom stats na.omit
#' @importFrom data.table na.omit setattr
#' @importFrom data.table setattr
#' @rdname score
#' @export
score.forecast_binary <- function(data, metrics = rules_binary(), ...) {
Expand All @@ -97,7 +97,8 @@ score.forecast_binary <- function(data, metrics = rules_binary(), ...) {


#' @importFrom Metrics se ae ape
#' @importFrom data.table na.omit setattr
#' @importFrom stats na.omit
#' @importFrom data.table setattr
#' @rdname score
#' @export
score.forecast_point <- function(data, metrics = rules_point(), ...) {
Expand All @@ -115,7 +116,8 @@ score.forecast_point <- function(data, metrics = rules_point(), ...) {
return(data[])
}

#' @importFrom data.table na.omit setattr
#' @importFrom stats na.omit
#' @importFrom data.table setattr
#' @rdname score
#' @export
score.forecast_sample <- function(data, metrics = rules_sample(), ...) {
Expand Down Expand Up @@ -152,8 +154,9 @@ score.forecast_sample <- function(data, metrics = rules_sample(), ...) {
return(data[])
}

#' @importFrom data.table na.omit setattr
#' @importFrom data.table `:=` as.data.table rbindlist %like%

#' @importFrom stats na.omit
#' @importFrom data.table `:=` as.data.table rbindlist %like% setattr
#' @rdname score
#' @export
score.forecast_quantile <- function(data, metrics = rules_quantile(), ...) {
Expand Down
9 changes: 1 addition & 8 deletions man/get_forecast_unit.Rd

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

0 comments on commit 5c7bdb9

Please sign in to comment.