Commit ce4b10c9 authored by pbac's avatar pbac
Browse files


parent 840cddcc
output: github_document
<!---usethis::use_readme_rmd() -->
<!-- is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
# onlineforecast <img src='misc-R/figures/onlineforecast.png' align="right" height="139" />
<!-- badges: start -->
[![CRAN status](](
[![Lifecycle: stable](](
[![CRAN RStudio mirror downloads](](
<!-- badges: end -->
The *onlineforecast* R package computes new forecasts whenever new observations becomes available by using recursive estimation. The package makes it easy to setup models to be used for online forecasting, where the user can create their own online forecast-set-up with their own inputs. The pacakge is created based on the authors long experience of formulating time series models which use weather forecasts as inputs. The challenge comes from the overlapping time series as the forecast needs to be updated whenever the weather forecast is updated.
See more on [onlineforecast]( webpage
## Installation
You can install the released version of onlineforecast from [CRAN]( with:
``` r
## Example
See examples on how to use the package on the website, [onlineforecast]( where multiple vignettes demonstrate how it works.
citHeader("To cite onlineforecast in publications use:")
entry = "Article",
title = "Short-term heat load forecasting for single family houses",
......@@ -15,3 +14,11 @@ citEntry(
"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."
entry = "Manual",
title = "{{onlineforecast}: Forecast Modelling for Online Applications}",
author = "Peder Bacher and Hjörleifur G. Bergsteinsson",
year = "2021",
note = "R package version 0.10.1",
url = ""
......@@ -62,8 +62,18 @@ library(roxygen2)
build(".", vignettes=TRUE)
# The version (change only in DESCRIPTION)
txt <- scan("DESCRIPTION", character())
ver <- txt[which(txt == "Version:") + 1]
# Update CITATION (change the year manually)
txt2 <- scan("inst/CITATION", character(), sep="#", quote="")
txt2[grep("R package version",txt2)] <- paste0(' note = "R package version ',ver,'",')
write.table(txt2, "inst/CITATION", row.names=FALSE, col.names=FALSE, quote=FALSE)
# Install it
gzfile <- paste0("../onlineforecast_",ver,".tar.gz")
# ----------------------------------------------------------------
......@@ -71,7 +81,7 @@ library(onlineforecast)
# ----------------------------------------------------------------
# Build binary package
#system("R CMD INSTALL --build ../onlineforecast_0.9.3.tar.gz")
#system(paste0("R CMD INSTALL --build ",gzfile))
# ----------------------------------------------------------------
......@@ -80,11 +90,11 @@ library(onlineforecast)
# Test before release
# Does give different results than check() above
#system("R CMD check --as-cran ../onlineforecast_0.9.4.tar.gz")
system("R CMD check ../onlineforecast_0.10.0.tar.gz")
#system(paste0("R CMD check --as-cran ",gzfile))
system(paste0("R CMD check ",gzfile))
unlink("onlineforecast.Rcheck/", recursive=TRUE)
# Use for more checking:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment