diff --git a/DESCRIPTION b/DESCRIPTION index adba77e773003159f66422996bc803160133085b..fd07315aa79605484c0272a5e0cf9e328c1703ee 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: onlineforecast Type: Package Title: Forecast Modelling for Online Applications -Version: 1.0.0 -Description: A framework for fitting adaptive forecasting models. Provides a way to use forecasts as input to models, e.g. weather forecasts for energy related forecasting. The models can be fitted recursively and can easily be setup for updating parameters when new data arrives. +Version: 0.9.0 +Description: A framework for fitting adaptive forecasting models. Provides a way to use forecasts as input to models, e.g. weather forecasts for energy related forecasting. The models can be fitted recursively and can easily be setup for updating parameters when new data arrives. See the included vignettes, the website <https://onlineforecasting.org> and Bacher et. al. (2013, <10.1016/j.enbuild.2013.04.022>). License: GPL-3 Encoding: UTF-8 LazyData: true diff --git a/R/bspline.R b/R/bspline.R index 12143d0a7ab7bb08b641c756deab952405978987..d3529410bd6f6716a61f888910e94e6469605726 100644 --- a/R/bspline.R +++ b/R/bspline.R @@ -11,7 +11,7 @@ #' #' See the help for all arguments with \code{?splines::bs}. NOTE that two arguments have different default values. #' -#' See the example \url{https://onlineforecasting/examples/solar-power-forecasting.html} where the function is used in a model. +#' See the example \url{https://onlineforecasting.org/examples/solar-power-forecasting.html} where the function is used in a model. #' #' @family Transform stage functions #' diff --git a/R/data.R b/R/data.R index 00964c925a6a0daa2a6299f3b6d1de14464cd62d..06409f452787c8daae6a05ddc5567d12f4ff6cd9 100644 --- a/R/data.R +++ b/R/data.R @@ -16,5 +16,5 @@ #' \item{Ta}{Weather forecasts of ambient temperature up to 36 hours ahead from DMI in Celcius} #' \item{Ta}{Weather forecasts of global radiation up to 36 hours ahead from DMI in W/m^2} #' } -#' @source See \url{onlineforecasting.org/datasets}. +#' @source See \url{https://onlineforecasting.org/examples/datasets.html}. "Dbuilding" diff --git a/R/forecastmodel.R-documentation.R b/R/forecastmodel.R-documentation.R index 8640b63ea1434457f41bb31763c3f60d4307e904..82d0f29073d0033a30ff1d771cd7693329928510 100644 --- a/R/forecastmodel.R-documentation.R +++ b/R/forecastmodel.R-documentation.R @@ -7,7 +7,7 @@ #' R6 class for a forecastmodel #' #' This class holds the variables and functions needed for defining and setting up a forecast model - independent of the fitting scheme. -#' See the vignettes on how to setup and use a model and the website \url{onlineforecasting.org} for more info. +#' See the vignettes on how to setup and use a model and the website \url{https://onlineforecasting.org} for more info. #' #' @title Class for forecastmodels #' @name forecastmodel diff --git a/R/onlineforecast-package.R b/R/onlineforecast-package.R index 153cc02ce889e1743cd7b26ba6f365ad6ed8eac6..4ac94e9cf0603a9761a6599199d9de48c42b9eb2 100644 --- a/R/onlineforecast-package.R +++ b/R/onlineforecast-package.R @@ -2,7 +2,7 @@ #' #' This package provides functions to for setting up forecast models which run in an online setting, e.g. like demand, solar and wind power forecasts updated regularly - often hourly, and forecasts up to 48 hours ahead. #' -#' See the website \url{onlineforecasting.org} for more information. +#' See the website \url{https://onlineforecasting.org} for more information. #' #' @title Functions for online forecasting #' @docType package diff --git a/R/operator_multiply.R b/R/operator_multiply.R index 843d10b6b26e4211cf58880e07874116dc3311fc..2ce598f0d54a20521110444b2659c834264555a9 100644 --- a/R/operator_multiply.R +++ b/R/operator_multiply.R @@ -17,7 +17,7 @@ #' and y, then only the columns with same names are used, hence the resulting matrices can be #' of lower dimensions. #' -#' See the example \url{https://onlineforecasting/examples/solar-power-forecasting.html} where the operator is used. +#' See the example \url{https://onlineforecasting.org/examples/solar-power-forecasting.html} where the operator is used. #' #' @title Multiplication of list with y, elementwise #' @param x a list of matrices, data.frames, etc. diff --git a/cran-comments.md b/cran-comments.md index 499d22b0237771d880e308cc254c8bd8dc755feb..7b94982e6007a205211b60c0b246d753fd76be53 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,5 +1,11 @@ -## Test environments -* local Fedora install, R 3.6.3 +We have tested on Linux 3.6.3 and 4.0.2, and on Windows 4.0.2, results are +below. Since the warnings are not the same, we think that they are related to +the particular installations, thus think it pass the CRAN server +checks. Let's see :) + + +#---------------------------------------------------------------- +Fedora install, R 3.6.3: ## R CMD check results There were 1 WARNING and 1 NOTE. @@ -33,3 +39,46 @@ include <Rcpp.h> and don't do anything but matrix calculations and returning the results. So we it must be some setting in the compiler creating this warning. Hopefully it's not there when compiled on cran. +#---------------------------------------------------------------- + + +#---------------------------------------------------------------- +Linux in container "rocker/rstudio" (in podman, had some permission issues, and +latex compilation problems), R 4.0.2: + +Two NOTEs: + +> checking installed package size ... NOTE + installed size is 6.2Mb + sub-directories of 1Mb or more: + doc 3.0Mb + libs 2.5Mb + +> checking compilation flags used ... NOTE + Compilation used the following non-portable flag(s): + ‘-Wdate-time’ ‘-Werror=format-security’ ‘-Wformat’ + +#---------------------------------------------------------------- + + +#---------------------------------------------------------------- +Windows install, R 4.0.2: + +One Warning and two NOTEs: + +> checking compiled code ... OK + WARNING + 'qpdf' is needed for checks on size reduction of PDFs + +> checking installed package size ... NOTE + installed size is 5.7Mb + sub-directories of 1Mb or more: + doc 3.0Mb + libs 2.1Mb + +> checking for non-standard things in the check directory ... NOTE + Found the following files/directories: + 'cache' + +0 errors √ | 1 warning x | 2 notes x +#---------------------------------------------------------------- diff --git a/inst/CITATION b/inst/CITATION index 396e530172dd5c8fee9594779166cb9eface54c3..2e5aa2b43cd3ef4804249b809837abb2b402d1f6 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -9,6 +9,7 @@ citEntry( volume = "65", number = "0", pages = "101-112", + doi = "10.1016/j.enbuild.2013.04.022", url = "http://onlineforecasting.org", textVersion = paste( "We are in process of writing a journal paper about the package, but for now we referer to the paper 'Short-term heat load forecasting for single family houses', in which the implemented modelling is described." diff --git a/make.R b/make.R index a7e27cc473d99bda37ab43ada40c726e699b1fb6..f5deceb15c6193dd6de919483ba85015df08c1bc 100644 --- a/make.R +++ b/make.R @@ -59,12 +59,12 @@ library(roxygen2) # ---------------------------------------------------------------- -# Build the package (remember to rebuild vignettes for release) +# Build the package document() build(".", vignettes=TRUE) # Install it -install.packages("../onlineforecast_1.0.0.tar.gz") +install.packages("../onlineforecast_0.9.0.tar.gz") library(onlineforecast) @@ -73,13 +73,15 @@ library(onlineforecast) # Test before release devtools::check() -devtools::check_built("../onlineforecast_1.0.0.tar.gz") +devtools::check_built("../onlineforecast_0.9.0.tar.gz") # Does give different results than check() above -system("R CMD check ../onlineforecast_1.0.0.tar.gz") +system("R CMD check ../onlineforecast_0.9.0.tar.gz") +unlink("onlineforecast.Rcheck/", recursive=TRUE) + +# Use for more checking: +# https://docs.r-hub.io/ -# Test it on Windows with: -# https://win-builder.r-project.org/ #----------------- @@ -109,8 +111,7 @@ system("R CMD check ../onlineforecast_1.0.0.tar.gz") # Run installation of packages # Make a cup of coffee # Go to terminal and run: -# "sudo apt-get install xml2" -# "sudo apt-get install texlive" +# "sudo apt-get install xml2 qpdf texlive" # Other versions with # "podman run --rm -p 8787:8787 -e PASSWORD=pw -v /home/pbac/g:/home/rstudio/g rocker/rstudio:3.6.1" diff --git a/vignettes/make.R b/vignettes/make.R index 698cef4630c989b4da507038dc44cbf6dd450919..90660229565de7e4796cdc6278db235cc2805c09 100644 --- a/vignettes/make.R +++ b/vignettes/make.R @@ -7,8 +7,7 @@ library(rmarkdown) dirnam <- "../tmp/vignettes/" dir.create("../tmp") dir.create(dirnam) -file.remove(dir("cache", full.names=TRUE)) -file.remove("cache") +unlink("cache", recursive=TRUE) makeit <- function(nam, openit=FALSE, clean=TRUE){ namrmd <- paste0(nam,".Rmd") @@ -19,17 +18,17 @@ makeit <- function(nam, openit=FALSE, clean=TRUE){ } # -file.remove(dir(paste0(dirnam,"tmp-setup-data/"), full.names=TRUE)) +unlink(paste0(dirnam,"tmp-setup-data/"), recursive=TRUE) makeit("setup-data", openit=FALSE) # -file.remove(dir(paste0(dirnam,"tmp-setup-and-use-model/"), full.names=TRUE)) +unlink(paste0(dirnam,"tmp-setup-and-use-model/"), recursive=TRUE) makeit("setup-and-use-model", openit=FALSE, clean=TRUE) # -file.remove(dir(paste0(dirnam,"tmp-output/tmp-forecast-evaluation/"), full.names=TRUE)) +unlink(paste0(dirnam,"tmp-output/tmp-forecast-evaluation/"), recursive=TRUE) makeit("forecast-evaluation", openit=FALSE) # Finish and include it!! -## file.remove(dir(paste0(dirnam,"tmp-output/tmp-online-updating/"), full.names=TRUE)) +## unlink(paste0(dirnam,"tmp-output/tmp-online-updating/"), recursive=TRUE) ## makeit("online-updating", openit=FALSE) diff --git a/vignettes/setup-and-use-model.Rmd b/vignettes/setup-and-use-model.Rmd index 035a91219553a31c58497efb6959233f3c4d0a08..3e44a1c6efea5f067ba54ed74a18af699ca7cac1 100644 --- a/vignettes/setup-and-use-model.Rmd +++ b/vignettes/setup-and-use-model.Rmd @@ -463,10 +463,9 @@ so running it again will read the cache instead of calculating the optimization: rls_optim(model, D, cachedir="cache")$par ``` -Remove the cache by: +Remove the cache directory by: ```{r} -file.remove(dir("cache", full.names=TRUE)) -file.remove("cache") +unlink("cache", recursive=TRUE) ``` diff --git a/vignettes/setup-data.Rmd b/vignettes/setup-data.Rmd index c53b3a5812764d9daca508ae32ee292b3315738f..c2371e949183d5f2a5a02e5b5aa8e629a3b4e68a 100644 --- a/vignettes/setup-data.Rmd +++ b/vignettes/setup-data.Rmd @@ -239,7 +239,7 @@ applications this is a useful convention. ### Forecasts -As described in [onlineforecast](onlineforecast.pdf) the setup of forecasts for +As described in [onlineforecasting] the setup of forecasts for model inputs always follows the same format - as presented in the following. This is also the format of the forecasts generated by functions in the package. Hence all forecasts must follow this format.