Skip to content
Snippets Groups Projects
Commit 97aba0d2 authored by pbac's avatar pbac
Browse files

Ready for testing 1.0.0 on different OS

parent 66d8e6a4
No related branches found
No related tags found
No related merge requests found
......@@ -10,4 +10,5 @@
^vignettes/online-updating.Rmd
^tests
^misc-R$
^.*\.Rhistory$
\ No newline at end of file
^.*\.Rhistory$
^cran-comments.md
\ No newline at end of file
......@@ -7,8 +7,8 @@ License: GPL-3
Encoding: UTF-8
LazyData: true
Authors@R: c(
person("Peder", "Bacher", email="pbac@dtu.dk", role = c("aut", "cre")),
person("Hjorleifur G", "Bergsteinsson", email="hgbe@dtu.dk", role = c("aut")))
person("Peder", "Bacher", email="pbac@dtu.dk", role = "cre"),
person("Hjorleifur G", "Bergsteinsson", email="hgbe@dtu.dk", role = "aut"))
Depends: R (>= 3.0.0)
Imports:
Rcpp (>= 0.12.18),
......
......@@ -17,11 +17,13 @@
#'
#' @param X data.frame (as part of data.list) with horizons as columns named \code{kxx} (i.e. one for each horizon)
#' @param Boundary.knots The value is NA: then the boundaries are set to the range of each horizons (columns in X). See \code{?splines::bs}
#' @param intercept Default value is TRUE: in an onlineforecast model there is no intercept per defauls (set by \code{one()}. See \code{?splines::bs}
#' @param intercept Default value is TRUE: in an onlineforecast model there is no intercept per default (set by \code{one()}). It's default to FALSE in \code{?splines::bs}.
#' @param df See \code{?splines::bs}
#' @param knots See \code{?splines::bs}
#' @param degree See \code{?splines::bs}
#' @param bknots Is just a short for Boundary.knots and replace Boundary.knots (if Boundary.knots is not given)
#' @return List of data frames with the computed base splines, each with columns for the same horizons as in X
#' @rdname bs
#' @examples
#'
#' # How to make a diurnal curve using splines
......@@ -52,7 +54,11 @@
#'
#'
#' @export
bspline <- function(X, Boundary.knots = NA, intercept = TRUE, df = NULL, knots = NULL, degree = 3) {
bspline <- function(X, Boundary.knots = NA, intercept = TRUE, df = NULL, knots = NULL, degree = 3, bknots = NA) {
# bknots is just a short for Boundary.knots and replace if Boundary.knots are not given.
if(is.na(Boundary.knots)){
Boundary.knots <- bknots
}
# If a list, then call on each element
if (class(X) == "list") {
# Call again for each element
......
#' onlineforecast
#' Functions for online forecasting
#'
#' This package provides functions to support forecast models which run in an online setting, like demand, solar and wind power forecasts updated regularly - often hourly up to 48 hours ahead.
#' 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.
#'
#' @title Functions for online forecasting
#' @docType package
#' @name onlineforecast
#' @useDynLib onlineforecast
......
......@@ -53,6 +53,8 @@ setpar <- function(tmpl = "ts", mfrow = c(1,1), ...) {
# prm <- as.list(match.call()[i]) p <- list() for(i in 1:length(prm)) { p$new <-
# eval(prm[[i]]) nams(p)[i] <- nams(prm)[i] } par(p)
}
# Only done to remove NOTE in "R CMD check", that R6 package is not used
if(FALSE){ R6::R6Class("temp", public = list(x=1)) }
# Set par and return the original par options(warn = (-1)) options(warn = 1)
invisible(p)
}
## Test environments
* local Fedora install, R 3.6.3
## R CMD check results
There were 1 WARNING and 1 NOTE.
One WARNING:
* checking installed package size ... NOTE
installed size is 6.3Mb
sub-directories of 1Mb or more:
doc 3.0Mb
libs 2.7Mb
So it's a little big maybe, cut can't make it smaller (it's 3 vignettes in doc)
One NOTE:
* checking compiled code ... WARNING
File ‘onlineforecast/libs/onlineforecast.so’:
Found ‘abort’, possibly from ‘abort’ (C)
Objects: ‘RcppExports.o’, ‘rls_update_cpp.o’
Found ‘printf’, possibly from ‘printf’ (C)
Objects: ‘RcppExports.o’, ‘rls_update_cpp.o’
We think that this must be related to the compiler used. We used Rcpp to include
two cpp function, and only:
include <RcppArmadillo.h>
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.
......@@ -9,8 +9,9 @@
library(devtools)
library(roxygen2)
# pack <- as.package("../onlineforecast")
# load_all(pack)
## document()
## pack <- as.package("../onlineforecast")
## load_all(pack)
# Update NAMESPACE, use this function to export all functions! (with @export, but S3methods (e.g. print.lm) will not get exported, so change it to export)
## docit <- function(){
......@@ -43,8 +44,8 @@ library(roxygen2)
#use_test("newtest")
# # Run all tests
document()
test()
#document()
#test()
# # Run the examples
# run_examples()
......@@ -63,7 +64,6 @@ test()
document()
build(".", vignettes=TRUE)
# Install it
install.packages("../onlineforecast_1.0.0.tar.gz")
......@@ -77,3 +77,9 @@ library(onlineforecast)
# # What is exported?
# onlineforecast::
# ----------------------------------------------------------------
# On release
# Test it on Windows with: https://win-builder.r-project.org/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment