Skip to content
Open
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
2 changes: 1 addition & 1 deletion R/accessors.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ mable_vars <- function(x){
#' @export
mable_vars.mdl_df <- function(x){
x%@%"model"
}
}
2 changes: 1 addition & 1 deletion R/accuracy.R
Original file line number Diff line number Diff line change
Expand Up @@ -638,4 +638,4 @@ accuracy.fbl_ts <- function(object, data, measures = point_accuracy_measures, ..
.accuracy = measures
) %>%
unnest_tbl(".accuracy")
}
}
2 changes: 1 addition & 1 deletion R/aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,4 @@ scale_type.agg_vec <- function(x) {
# out[names(dots)[[i]]] <- res
# }
# out
# }
# }
2 changes: 1 addition & 1 deletion R/box_cox.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ inv_box_cox <- function(x, lambda) {
z <- x[!lambda_0] * lambda[!lambda_0] + 1
x[!lambda_0] <- sign(z) * abs(z) ^ (1 / lambda[!lambda_0])
x
}
}
2 changes: 1 addition & 1 deletion R/components.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ components.mdl_df <- function(object, ...){
#' @export
components.mdl_ts <- function(object, ...){
components(object$fit, ...)
}
}
2 changes: 1 addition & 1 deletion R/dable.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ combine_dcmp_attr <- function(lst_dcmp){

list(response = resp[[1]], method = paste0(unique(method), collapse = " & "),
seasons = strc, aliases = aliases)
}
}
2 changes: 1 addition & 1 deletion R/dplyr-fable.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ summarise.fbl_ts <- function(.data, ..., .groups = NULL) {
}

#' @export
summarise.grouped_fbl <- summarise.fbl_ts
summarise.grouped_fbl <- summarise.fbl_ts
2 changes: 1 addition & 1 deletion R/equation.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ equation.mdl_ts <- function(object, ...){
abort("Cannot display equations containing transformations.")
}
equation(object[["fit"]])
}
}
2 changes: 1 addition & 1 deletion R/fable.R
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,4 @@ rbind.fbl_ts <- function(...){

type_sum.fbl_ts <- function(x){
"fable"
}
}
2 changes: 1 addition & 1 deletion R/fabletools-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ globalVariables(".")
#' @importFrom tidyselect all_of
#' @importFrom lifecycle deprecate_warn deprecated
## usethis namespace: end
NULL
NULL
2 changes: 1 addition & 1 deletion R/features.R
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,4 @@ NULL
#'
#' @keywords internal
#' @name features_by_tag
NULL
NULL
2 changes: 1 addition & 1 deletion R/fitted.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ hfitted.mdl_ts <- function(object, h, ...) {
fits <- map2(bt, split(fits, col(fits)), function(bt, fit) bt(fit))
}
fits
}
}
2 changes: 1 addition & 1 deletion R/forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,4 @@ scenarios <- function(..., names_to = ".scenario"){
structure(list2(
...
), names_to = names_to)
}
}
2 changes: 1 addition & 1 deletion R/frequency.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ get_frequencies.Period <- function(period, data, ...){
lubridate::microseconds(microsecond) + lubridate::nanoseconds(nanosecond))

suppressMessages(period / interval)
}
}
4 changes: 2 additions & 2 deletions R/generate.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @param seed The seed for the random generation from distributions.
#' @param ... Additional arguments for individual simulation methods.
#'
#' @examplesIf requireNamespace("fable", quietly = TRUE)
#' @examplesIf requireNamespace("fable quietly = TRUE)
#' library(fable)
#' library(dplyr)
#' UKLungDeaths <- as_tsibble(cbind(mdeaths, fdeaths), pivot_longer = FALSE)
Expand Down Expand Up @@ -145,4 +145,4 @@ block_bootstrap <- function (n, window_size, size = n) {
}
start_from <- sample.int(window_size, 1)
bx[seq(start_from, length.out = size)]
}
}
2 changes: 1 addition & 1 deletion R/guess.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ guess_response <- function(.data){
expr_name(out)
))
out
}
}
2 changes: 1 addition & 1 deletion R/hypothesise.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ hypothesize.mdl_ts <- function(x, tests = list(), ...){
!!!map(tests, calc, x$fit, ...),
.names_to = ".test"
)
}
}
2 changes: 1 addition & 1 deletion R/interpolate.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ Does your interpolation data include all variables required by the model?", e$me
new_data[names(resp)] <- map2(new_data[names(resp)], object$transformation,
function(x, f) invert_transformation(f)(x))
new_data
}
}
2 changes: 1 addition & 1 deletion R/lst_mdl.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ vec_cast.lst_mdl.lst_mdl <- function(x, to, ...){
abort("Cannot combine model lists with different reconciliation strategies.")
}
x
}
}
2 changes: 1 addition & 1 deletion R/mdl_ts.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ model_sum.default <- function(x){
#' @export
model_sum.mdl_ts <- function(x){
model_sum(x[["fit"]])
}
}
2 changes: 1 addition & 1 deletion R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ model_rhs <- function(model){
else{
expr(NULL)
}
}
}
2 changes: 1 addition & 1 deletion R/model_combination.R
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,4 @@ residuals.model_combination <- function(object, type = "response", ...) {
object[mdls] <- map(object[mdls], residuals, type = "response", ...)
res <- map(object, function(x) if(is_tsibble(x)) x[[".resid"]] else x)
eval_tidy(expr, res)
}
}
2 changes: 1 addition & 1 deletion R/model_null.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ model_sum.null_mdl <- function(x){
"NULL model"
}
#' @export
report.NULL <- report.null_mdl
report.NULL <- report.null_mdl
2 changes: 1 addition & 1 deletion R/outliers.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ outliers.mdl_df <- function(object, ...){
#' @export
outliers.mdl_ts <- function(object, ...){
object$data[outliers(object$fit, ...),]
}
}
2 changes: 1 addition & 1 deletion R/parse.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,4 @@ Please specify a valid form of your transformation using `new_transformation()`.
response = syms(responses),
transformation = transformations
)
}
}
2 changes: 1 addition & 1 deletion R/refit.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ refit.mdl_ts <- function(object, new_data, ...){
object$fit <- refit(object[["fit"]], new_data, specials = specials, ...)
object$data <- new_data
object
}
}
2 changes: 1 addition & 1 deletion R/report.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ report.mdl_ts <- function(object, ...){
cat("\nA model specific report is not available for this model class.")
}
)
}
}
2 changes: 1 addition & 1 deletion R/residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ Defaulting to `type="response"`', type, model_sum(object)))
out <- object$data[index_var(object$data)]
out[nm] <- .resid
out
}
}
2 changes: 1 addition & 1 deletion R/response.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ response.mdl_ts <- function(object, ...){
out <- object$data[index_var(object$data)]
out[if(length(resp) == 1) ".response" else mv] <- resp
out
}
}
2 changes: 1 addition & 1 deletion R/specials.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ fable_xreg_matrix <- function(..., .data, default_intercept = TRUE) {
return(matrix(data = 1, nrow = NROW(.data), dimnames = list(NULL, "(Intercept)")))
}
mm
}
}
2 changes: 1 addition & 1 deletion R/stream.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ stream.mdl_ts <- function(object, new_data, ...){
object$fit <- stream(object[["fit"]], new_data, specials = specials, ...)
object$data <- bind_rows(object$data, select(new_data, !!!syms(colnames(object$data))))
object
}
}
2 changes: 1 addition & 1 deletion R/tbl_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dim_tbl <- function (x){
dim_x <- dim(x)
format_dim <- map_chr(dim_x, big_mark)
paste(format_dim, collapse = " x ")
}
}
2 changes: 1 addition & 1 deletion R/transform.R
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,4 @@ inverse_table$add("base", "(",
function(operation, target, result){
call2("(", !!!exprs(!!result))
}
)
)
2 changes: 1 addition & 1 deletion R/vctrs-dable.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ vec_cast.tbl_ts.dcmp_ts <- function(x, to, ...) {
tbl, key = key_vars(to), index = index_var(to), index2 = index2_var(to),
ordered = TRUE, validate = TRUE, .drop = key_drop_default(to)
)
}
}
2 changes: 1 addition & 1 deletion R/vctrs-fable.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ vec_restore.fbl_ts <- function(x, to, ..., n = NULL) {
ordered = TRUE, validate = TRUE, .drop = key_drop_default(to))
}
build_fable(x, response = response_vars(to), distribution = distribution_var(to))
}
}
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ register_s3_method <- function(pkg, generic, class, fun = NULL) {
}
)
}
# nocov end
# nocov end