* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/AutoAds.Rcheck’ * using R Under development (unstable) (2025-11-16 r89026) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) GNU Fortran (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) * running under: Fedora Linux 40 (Workstation Edition) * using session charset: UTF-8 * checking for file ‘AutoAds/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘AutoAds’ version ‘0.1.0’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘AutoAds’ can be installed ... [12s/12s] OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [14s/15s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... OK * checking examples with --run-donttest ... ERROR Running examples in ‘AutoAds-Ex.R’ failed The error most likely occurred in: > ### Name: plot_trend_and_forecast > ### Title: Plot with trend and forecast > ### Aliases: plot_trend_and_forecast > ### Keywords: dplot hplot models regression ts > > ### ** Examples > ## No test: > ## The function is currently defined as > plot_trend_and_forecast <- function(data, x_col, y_col, group_col) { + data$Date <- as.Date(data$Date) + data_groups <- split(data, data[[group_col]]) + for (group in names(data_groups)) { + group_data <- data_groups[[group]] + time_series <- ts(group_data[[y_col]], frequency = 1, start = min(group_data[[x_col]])) + arima_model <- auto.arima(time_series) + forecast <- forecast(arima_model, h = 6) + forecast_dates <- seq(max(group_data[[x_col]]) + 1, + to = max(group_data[[x_col]]) + length(forecast$mean), + by = "day") + forecast_data <- data.frame(Date = forecast_dates, Forecast = forecast$mean) + print(ggplot() + + geom_line(data = group_data, aes(x = !!rlang::sym(x_col), y = !!rlang::sym(y_col))) + + geom_line(data = forecast_data, aes(x = Date, y = Forecast), color = "blue") + + geom_ribbon(data = forecast_data, aes(x = Date, ymin = forecast$lower[, 2], + ymax = forecast$upper[, 2]), fill = "blue", alpha = 0.2) + + labs(x = x_col, y = y_col, title = group) + + theme_minimal()) + } + } > > ## Example of use: > data <- data.frame( + Date = c("2022-07-01", "2022-07-02", "2022-07-03", "2022-07-29", "2022-07-30", "2022-07-31"), + Block = c("1_234", "1_234", "1_234", "1_235", "1_235", "1_235"), + Requests = c(372234, 268816, 291224, 1928854, 1928290, 786539), + Impressions = c(18537, 12432, 13764, 2839269, 2682648, 1114773), + Revenue = c(13.5, 9.13, 8.85, 1669.0, 1654.0, 739.0), + Clicks = c(1167, 720, 856, 214451, 196657, 93178), + Viewable = c(13320, 8214, 9768, 2446884, 2243865, 1063158) + ) > plot_trend_and_forecast(data, "Date", "Impressions", "Block") Error in auto.arima(time_series) : could not find function "auto.arima" Calls: plot_trend_and_forecast Execution halted * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR See ‘/data/blackswan/ripley/R/packages/tests-devel/AutoAds.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:42.37, 82.79 + 15.95