From f7cc1db660576a806a8184f0f686e3308309e515 Mon Sep 17 00:00:00 2001 From: Peder <pbac@dtu.dk> Date: Mon, 13 Jul 2020 23:01:28 +0200 Subject: [PATCH] fixed urls and small misc and submitted again --- DESCRIPTION | 4 +-- R/bspline.R | 2 +- R/data.R | 2 +- R/forecastmodel.R-documentation.R | 2 +- R/onlineforecast-package.R | 2 +- R/operator_multiply.R | 2 +- cran-comments.md | 53 +++++++++++++++++++++++++++++-- inst/CITATION | 1 + make.R | 17 +++++----- vignettes/make.R | 11 +++---- vignettes/setup-and-use-model.Rmd | 5 ++- vignettes/setup-data.Rmd | 2 +- 12 files changed, 76 insertions(+), 27 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index adba77e..fd07315 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 12143d0..d352941 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 00964c9..06409f4 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 8640b63..82d0f29 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 153cc02..4ac94e9 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 843d10b..2ce598f 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 499d22b..7b94982 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 396e530..2e5aa2b 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 a7e27cc..f5deceb 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 698cef4..9066022 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 035a912..3e44a1c 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 c53b3a5..c2371e9 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. -- GitLab