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

updated to new documentation format

parent a8f93167
No related branches found
No related tags found
No related merge requests found
Package: onlineforecast
Type: Package
Title: Forecast Modelling for Online Applications
Version: 1.0.1
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 the pre-print paper "onlineforecast: An R package for adaptive and recursive forecasting" <arXiv:2109.12915>.
Version: 1.0.2
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 the paper "onlineforecast: An R package for adaptive and recursive forecasting" <https://journal.r-project.org/articles/RJ-2023-031/>.
License: GPL-3
Encoding: UTF-8
LazyData: true
......@@ -25,7 +25,7 @@ Suggests:
data.table,
plotly
VignetteBuilder: knitr
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
URL: https://onlineforecasting.org
BugReports: https://lab.compute.dtu.dk/packages/onlineforecast/-/issues
Config/testthat/edition: 3
......@@ -88,7 +88,8 @@ export(score)
export(setpar)
export(stairs)
export(step_optim)
importFrom(Rcpp,sourceCpp)
exportPattern("^[[:alpha:]]+")
importFrom(Rcpp,evalCpp)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,graphics.off)
importFrom(graphics,axis)
......
#' @useDynLib onlineforecast
#' @importFrom Rcpp evalCpp
#' @exportPattern "^[[:alpha:]]+"
NULL
......@@ -40,6 +40,7 @@ lagdf <- function(x, lagseq){
}
#' @inherit lagdf
#' @export
lagdf.numeric <- function(x, lagseq) {
## Return a data.frame
......@@ -51,17 +52,20 @@ lagdf.numeric <- function(x, lagseq) {
}
#' @inherit lagdf
#' @export
lagdf.factor <- function(x, lagseq) {
lagdf.numeric(x, lagseq)
}
#' @inherit lagdf
#' @export
lagdf.character <- function(x, lagseq) {
lagdf.numeric(x, lagseq)
}
#' @inherit lagdf
#' @export
lagdf.logical <- function(x, lagseq) {
lagdf.numeric(x, lagseq)
......@@ -154,6 +158,8 @@ lagdf.data.frame <- function(x, lagseq) {
return(X)
}
#' @inherit lagdf.data.frame
#' @export
lagdf.matrix <- function(x, lagseq){
lagdf.data.frame(x, lagseq)
......@@ -196,4 +202,3 @@ lagdf.matrix <- function(x, lagseq){
## invisible(NULL)
## }
## }
......@@ -4,7 +4,7 @@
#load_all(as.package("../../onlineforecast"))
#?lp
#' First-order low-pass filtering of a time series vector.
#' First-order low-pass filtering of time series.
#'
#' This function applies a first order unity gain low-pass filter to the columns of \code{X}.
#' The low-pass filter is applied to each column seperately. The stationary gain of the filter i one.
......@@ -66,6 +66,16 @@ lp <- function(X, a1, usestate = TRUE) {
}
#' First-order low-pass filtering of a time series vector.
#'
#' This function applies a first order unity gain low-pass filter vector.
#'
#' The \code{lp_vector_cpp} function does the same much faster.
#'
#' @title First-order low-pass filtering
#' @param x vector.
#' @param a1 The low-pass filter coefficient.
#' @return The low-pass filtered vector
lp_vector <- function(x, a1) {
## Make a 1'st order low pass filter as (5.3) p.46 in the HAN report.
y <- numeric(length(x))
......
#' Functions for online forecasting
#'
#' 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{https://onlineforecasting.org} for more information.
#'
#' @title Functions for online forecasting
#' @docType package
#' @name onlineforecast
#' @useDynLib onlineforecast
#' @importFrom Rcpp sourceCpp
#' @keywords internal
"_PACKAGE"
## usethis namespace: start
## usethis namespace: end
NULL
......@@ -277,6 +277,10 @@ plot_ts.data.frame <- function(object, patterns=".*", xlim = NA, ylims = NA, xla
plot_ts.matrix <- plot_ts.data.frame
#' @rdname plot_ts
#' @param data The data.frame from where to find columns to plot
#' @param xnm The name of the column
#' @param pattern The regex pattern
plot_ts_iseq <- function(data, pattern, xnm, namesdata){
iseq <- integer(0)
# Use these names when finding columns to plot
......@@ -302,6 +306,14 @@ plot_ts_iseq <- function(data, pattern, xnm, namesdata){
# Plot all columns found with regex pattern
#' @importFrom graphics plot lines axis title axis.POSIXct mtext par legend
#' @rdname plot_ts
#' @param iplot The plot index
#' @param ylim ylim in the plot
#' @param main main title
#' @param mainline line for the main title
#' @param colormap the colormap for the lines
#' @param legendtext Text for the legend
#' @param xaxis Boolean determining to include the xaxis
plot_ts_series <- function(data, pattern, iplot = 1,
ylim = NA, xlab = "", main = "", mainline = -1.2, colormap = NA, legendtext = NA,
xat = NA, plotit = TRUE, p = NA, namesdata = NA, xaxis = TRUE, ...) {
......
......@@ -27,6 +27,8 @@ plotly_ts <- function(object, patterns=".*", xlim = NA, ylims = NA, xlab = "", y
UseMethod("plotly_ts")
}
#' @inherit plotly_ts
#' @export
plotly_ts.data.list <- function(object, patterns=".*", xlim = NA, ylims = NA, xlab = "", ylabs = NA,
mains = "", mainouter="", legendtexts = NA, colormaps = NA, xat = NA, usely=TRUE, p=NA, kseq = NA, ...) {
......@@ -34,6 +36,8 @@ plotly_ts.data.list <- function(object, patterns=".*", xlim = NA, ylims = NA, xl
mains = mains, mainouter=mainouter, legendtexts = legendtexts, colormaps = colormaps, xat = xat, usely = usely, p = p, kseq=kseq, ...)
}
#' @inherit plotly_ts
#' @export
plotly_ts.data.frame <- function(object, patterns=".*", xlim = NA, ylims = NA, xlab = "", ylabs = NA,
mains = "", mainouter="", legendtexts = NA, colormaps = NA, xat = NA, usely=TRUE, p=NA, namesdata=NA, ...) {
......
......@@ -57,6 +57,7 @@ resample <- function(object, ts, tstart=NA, tend=NA, timename="t", fun=mean, qua
}
#' @importFrom stats aggregate
#' @inherit resample
#' @export
resample.data.frame <- function(object, ts, tstart=NA, tend=NA, timename="t", fun=mean, quantizetime=TRUE, ...)
{
......
......@@ -137,5 +137,6 @@ rls_summary <- function(object, scoreperiod = NA, scorefun = rmse, printit = TRU
}
#' @importFrom stats sd
#' @inherit rls_summary
#' @export
summary.rls_fit <- rls_summary
#----------------------------------------------------------------
# v1.0.2
Updated package documentation to fix:
You have file
'onlineforecast/man/onlineforecast.Rd' with
\docType{package}, likely intended as a package
overview help file, but without the appropriate
PKGNAME-package \alias as per "Documenting packages"
in R-exts.
From email:
From: Kurt Hornik
<Kurt.Hornik@wu.ac.at>Sent: 19 August 2023 10:53
AMTo: Peder Bacher <pbac@dtu.dk>Cc:
Kurt.Hornik@R-project.org
<Kurt.Hornik@R-project.org>Subject: CRAN package
onlineforecast
#----------------------------------------------------------------
# v1.0.1
......
citHeader("To cite onlineforecast in publications use:")
citEntry(
entry = "Article",
title = "onlineforecast: An R package for adaptive and recursive forecasting",
bibentry(
bibtype = "Article",
title = "Onlineforecast: An R Package for Adaptive and Recursive Forecasting",
author = "Peder Bacher and Hjörleifur G. Bergsteinsson and Linde Frölke and Mikkel L. Sørensen and Julian Lemos-Vinasco and Jon Liisberg and Jan Kloppenborg Møller and Henrik Aalborg Nielsen and Henrik Madsen",
Journal = "test",
year = "2021",
eprint = "2109.12915",
archivePrefix="arXiv",
primaryClass="stat.CO",
url = "https://arxiv.org/abs/2109.12915",
textVersion = "The article \"onlineforecast: An R package for adaptive and recursive forecasting\", see https://arxiv.org/abs/2109.12915. This is the pre-print version submitted to Journal of Statistical Software."
journal = "R Journal",
year = "2023",
volume = "15/1",
pages = "173-194",
doi = "10.32614/RJ-2023-031",
url = "https://journal.r-project.org/articles/RJ-2023-031/"
)
citEntry(
entry = "Manual",
bibentry(
bibtype = "Manual",
title = "{{onlineforecast}: Forecast Modelling for Online Applications}",
author = "Peder Bacher and Hjörleifur G. Bergsteinsson",
year = "2022",
note = "R package version 1.0.1",
url = "https://onlineforecasting.org",
textVersion = ""
)
#----------------------------------------------------------------
## #----------------------------------------------------------------
## # These packages must be installed
## install.packages("Rcpp")
## install.packages("R6")
......@@ -7,7 +7,7 @@
## # cpp matrix library
## install.packages("RcppArmadillo")
## # For develop install
## install.packages("devtools")
## install.packages("devtools", type="source")
## install.packages("roxygen2")
## # For testing and building vignettes
## install.packages("rmarkdown")
......@@ -22,9 +22,9 @@ library(devtools)
library(roxygen2)
# Load the package directly
## document()
## pack <- as.package("../onlineforecast")
## load_all(pack)
document()
pack <- as.package("../onlineforecast")
load_all(pack)
# ----------------------------------------------------------------
......@@ -45,6 +45,8 @@ library(roxygen2)
# Init new test
#use_test("newtest")
# # Run all tests
document()
test()
......@@ -60,10 +62,7 @@ run_examples()
# The version (move the value from DESCRIPTION to other places, so only update it 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)
# Not needed to write elsewhere now
# ----------------------------------------------------------------
# Build the package
......@@ -71,10 +70,11 @@ document()
# Run the "vignettes/make.R" to build a cache
build(".", vignettes=TRUE)
# Install it
# The file
gzfile <- paste0("../onlineforecast_",ver,".tar.gz")
install.packages(gzfile)
# Install it
install.packages(gzfile)
library(onlineforecast)
# ----------------------------------------------------------------
......@@ -163,3 +163,4 @@ unlink("onlineforecast.Rcheck/", recursive=TRUE)
## write(x, nm)
## }
## docit()
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lagdf.R
\name{lagdf.character}
\alias{lagdf.character}
\title{Lagging which returns a data.frame}
\usage{
\method{lagdf}{character}(x, lagseq)
}
\arguments{
\item{x}{The data.frame to have columns lagged}
\item{lagseq}{The sequence of lags as an integer. Alternatively, as a character "+k", "-k", "+h" or "-h", e.g. "k12" will with "+k" be lagged 12.}
}
\value{
A data.frame.
A data.frame with columns that are lagged
}
\description{
Lagging by shifting the values back or fourth always returning a data.frame.
Lagging of a data.frame
}
\details{
This function lags (shifts) the values of the vector. A data.frame is always returned with the columns
as the vectors lagged with the values in lagseq. The column names are set to "kxx", where xx are the lag of the column.
This function lags the columns with the integer values specified with the argument \code{lagseq}.
}
\examples{
# The values are simply shifted
# Ahead in time
lagdf(1:10, 3)
# Back in time
lagdf(1:10, -3)
# Works but returns a numeric column
lagdf(as.factor(1:10), 3)
# Works and returns a character column
lagdf(as.character(1:10), 3)
# Giving several lag values
lagdf(1:10, c(1:3))
lagdf(1:10, c(5,3,-1))
# See also how to lag a forecast data.frame with: ?lagdf.data.frame
# dataframe of forecasts
X <- data.frame(k1=1:10, k2=1:10, k3=1:10)
X
# Lag all columns
lagdf(X, 1)
\dontshow{if(!all(is.na(lagdf(X, 1)[1, ]))){stop("Lag all columns didn't work")}}
# Lag each column different steps
lagdf(X, 1:3)
# Lag each columns with its k value from the column name
lagdf(X, "+k")
\dontshow{
if(any(lagdf(X, 1:3) != lagdf(X, "+k"),na.rm=TRUE)){stop("Couldn't lag +k")}
}
# Also works for columns named hxx
names(X) <- gsub("k", "h", names(X))
lagdf(X, "-h")
# If lagseq must have length as columns in X, it doesn't know how to lag and an error is thrown
try(lagdf(X, 1:2))
\dontshow{
if(!class(lagdf(data.frame(k1=1:10), 2)) == "data.frame"){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
if(!all(dim(lagdf(data.frame(k1=1:10), "+k")) == c(10,1))){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
}
}
\seealso{
\code{\link{lagdf.data.frame}} which is run when \code{x} is a data.frame.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lagdf.R
\name{lagdf.factor}
\alias{lagdf.factor}
\title{Lagging which returns a data.frame}
\usage{
\method{lagdf}{factor}(x, lagseq)
}
\arguments{
\item{x}{The data.frame to have columns lagged}
\item{lagseq}{The sequence of lags as an integer. Alternatively, as a character "+k", "-k", "+h" or "-h", e.g. "k12" will with "+k" be lagged 12.}
}
\value{
A data.frame.
A data.frame with columns that are lagged
}
\description{
Lagging by shifting the values back or fourth always returning a data.frame.
Lagging of a data.frame
}
\details{
This function lags (shifts) the values of the vector. A data.frame is always returned with the columns
as the vectors lagged with the values in lagseq. The column names are set to "kxx", where xx are the lag of the column.
This function lags the columns with the integer values specified with the argument \code{lagseq}.
}
\examples{
# The values are simply shifted
# Ahead in time
lagdf(1:10, 3)
# Back in time
lagdf(1:10, -3)
# Works but returns a numeric column
lagdf(as.factor(1:10), 3)
# Works and returns a character column
lagdf(as.character(1:10), 3)
# Giving several lag values
lagdf(1:10, c(1:3))
lagdf(1:10, c(5,3,-1))
# See also how to lag a forecast data.frame with: ?lagdf.data.frame
# dataframe of forecasts
X <- data.frame(k1=1:10, k2=1:10, k3=1:10)
X
# Lag all columns
lagdf(X, 1)
\dontshow{if(!all(is.na(lagdf(X, 1)[1, ]))){stop("Lag all columns didn't work")}}
# Lag each column different steps
lagdf(X, 1:3)
# Lag each columns with its k value from the column name
lagdf(X, "+k")
\dontshow{
if(any(lagdf(X, 1:3) != lagdf(X, "+k"),na.rm=TRUE)){stop("Couldn't lag +k")}
}
# Also works for columns named hxx
names(X) <- gsub("k", "h", names(X))
lagdf(X, "-h")
# If lagseq must have length as columns in X, it doesn't know how to lag and an error is thrown
try(lagdf(X, 1:2))
\dontshow{
if(!class(lagdf(data.frame(k1=1:10), 2)) == "data.frame"){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
if(!all(dim(lagdf(data.frame(k1=1:10), "+k")) == c(10,1))){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
}
}
\seealso{
\code{\link{lagdf.data.frame}} which is run when \code{x} is a data.frame.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lagdf.R
\name{lagdf.logical}
\alias{lagdf.logical}
\title{Lagging which returns a data.frame}
\usage{
\method{lagdf}{logical}(x, lagseq)
}
\arguments{
\item{x}{The data.frame to have columns lagged}
\item{lagseq}{The sequence of lags as an integer. Alternatively, as a character "+k", "-k", "+h" or "-h", e.g. "k12" will with "+k" be lagged 12.}
}
\value{
A data.frame.
A data.frame with columns that are lagged
}
\description{
Lagging by shifting the values back or fourth always returning a data.frame.
Lagging of a data.frame
}
\details{
This function lags (shifts) the values of the vector. A data.frame is always returned with the columns
as the vectors lagged with the values in lagseq. The column names are set to "kxx", where xx are the lag of the column.
This function lags the columns with the integer values specified with the argument \code{lagseq}.
}
\examples{
# The values are simply shifted
# Ahead in time
lagdf(1:10, 3)
# Back in time
lagdf(1:10, -3)
# Works but returns a numeric column
lagdf(as.factor(1:10), 3)
# Works and returns a character column
lagdf(as.character(1:10), 3)
# Giving several lag values
lagdf(1:10, c(1:3))
lagdf(1:10, c(5,3,-1))
# See also how to lag a forecast data.frame with: ?lagdf.data.frame
# dataframe of forecasts
X <- data.frame(k1=1:10, k2=1:10, k3=1:10)
X
# Lag all columns
lagdf(X, 1)
\dontshow{if(!all(is.na(lagdf(X, 1)[1, ]))){stop("Lag all columns didn't work")}}
# Lag each column different steps
lagdf(X, 1:3)
# Lag each columns with its k value from the column name
lagdf(X, "+k")
\dontshow{
if(any(lagdf(X, 1:3) != lagdf(X, "+k"),na.rm=TRUE)){stop("Couldn't lag +k")}
}
# Also works for columns named hxx
names(X) <- gsub("k", "h", names(X))
lagdf(X, "-h")
# If lagseq must have length as columns in X, it doesn't know how to lag and an error is thrown
try(lagdf(X, 1:2))
\dontshow{
if(!class(lagdf(data.frame(k1=1:10), 2)) == "data.frame"){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
if(!all(dim(lagdf(data.frame(k1=1:10), "+k")) == c(10,1))){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
}
}
\seealso{
\code{\link{lagdf.data.frame}} which is run when \code{x} is a data.frame.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lagdf.R
\name{lagdf.matrix}
\alias{lagdf.matrix}
\title{Lagging which returns a data.frame}
\usage{
\method{lagdf}{matrix}(x, lagseq)
}
\arguments{
\item{x}{The data.frame to have columns lagged}
\item{lagseq}{The sequence of lags as an integer. Alternatively, as a character "+k", "-k", "+h" or "-h", e.g. "k12" will with "+k" be lagged 12.}
}
\value{
A data.frame.
A data.frame with columns that are lagged
}
\description{
Lagging by shifting the values back or fourth always returning a data.frame.
Lagging of a data.frame
}
\details{
This function lags (shifts) the values of the vector. A data.frame is always returned with the columns
as the vectors lagged with the values in lagseq. The column names are set to "kxx", where xx are the lag of the column.
This function lags the columns with the integer values specified with the argument \code{lagseq}.
}
\examples{
# The values are simply shifted
# Ahead in time
lagdf(1:10, 3)
# Back in time
lagdf(1:10, -3)
# Works but returns a numeric column
lagdf(as.factor(1:10), 3)
# Works and returns a character column
lagdf(as.character(1:10), 3)
# Giving several lag values
lagdf(1:10, c(1:3))
lagdf(1:10, c(5,3,-1))
# See also how to lag a forecast data.frame with: ?lagdf.data.frame
# dataframe of forecasts
X <- data.frame(k1=1:10, k2=1:10, k3=1:10)
X
# Lag all columns
lagdf(X, 1)
\dontshow{if(!all(is.na(lagdf(X, 1)[1, ]))){stop("Lag all columns didn't work")}}
# Lag each column different steps
lagdf(X, 1:3)
# Lag each columns with its k value from the column name
lagdf(X, "+k")
\dontshow{
if(any(lagdf(X, 1:3) != lagdf(X, "+k"),na.rm=TRUE)){stop("Couldn't lag +k")}
}
# Also works for columns named hxx
names(X) <- gsub("k", "h", names(X))
lagdf(X, "-h")
# If lagseq must have length as columns in X, it doesn't know how to lag and an error is thrown
try(lagdf(X, 1:2))
\dontshow{
if(!class(lagdf(data.frame(k1=1:10), 2)) == "data.frame"){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
if(!all(dim(lagdf(data.frame(k1=1:10), "+k")) == c(10,1))){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
}
}
\seealso{
\code{\link{lagdf.data.frame}} which is run when \code{x} is a data.frame.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lagdf.R
\name{lagdf.numeric}
\alias{lagdf.numeric}
\title{Lagging which returns a data.frame}
\usage{
\method{lagdf}{numeric}(x, lagseq)
}
\arguments{
\item{x}{The data.frame to have columns lagged}
\item{lagseq}{The sequence of lags as an integer. Alternatively, as a character "+k", "-k", "+h" or "-h", e.g. "k12" will with "+k" be lagged 12.}
}
\value{
A data.frame.
A data.frame with columns that are lagged
}
\description{
Lagging by shifting the values back or fourth always returning a data.frame.
Lagging of a data.frame
}
\details{
This function lags (shifts) the values of the vector. A data.frame is always returned with the columns
as the vectors lagged with the values in lagseq. The column names are set to "kxx", where xx are the lag of the column.
This function lags the columns with the integer values specified with the argument \code{lagseq}.
}
\examples{
# The values are simply shifted
# Ahead in time
lagdf(1:10, 3)
# Back in time
lagdf(1:10, -3)
# Works but returns a numeric column
lagdf(as.factor(1:10), 3)
# Works and returns a character column
lagdf(as.character(1:10), 3)
# Giving several lag values
lagdf(1:10, c(1:3))
lagdf(1:10, c(5,3,-1))
# See also how to lag a forecast data.frame with: ?lagdf.data.frame
# dataframe of forecasts
X <- data.frame(k1=1:10, k2=1:10, k3=1:10)
X
# Lag all columns
lagdf(X, 1)
\dontshow{if(!all(is.na(lagdf(X, 1)[1, ]))){stop("Lag all columns didn't work")}}
# Lag each column different steps
lagdf(X, 1:3)
# Lag each columns with its k value from the column name
lagdf(X, "+k")
\dontshow{
if(any(lagdf(X, 1:3) != lagdf(X, "+k"),na.rm=TRUE)){stop("Couldn't lag +k")}
}
# Also works for columns named hxx
names(X) <- gsub("k", "h", names(X))
lagdf(X, "-h")
# If lagseq must have length as columns in X, it doesn't know how to lag and an error is thrown
try(lagdf(X, 1:2))
\dontshow{
if(!class(lagdf(data.frame(k1=1:10), 2)) == "data.frame"){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
if(!all(dim(lagdf(data.frame(k1=1:10), "+k")) == c(10,1))){stop("Trying to lag data.frame with 1 column, but return is not class data.frame")}
}
}
\seealso{
\code{\link{lagdf.data.frame}} which is run when \code{x} is a data.frame.
}
......@@ -17,7 +17,7 @@ lp(X, a1, usestate = TRUE)
The low-pass filtered dataframe (as a matrix)
}
\description{
First-order low-pass filtering of a time series vector.
First-order low-pass filtering of time series.
}
\details{
This function applies a first order unity gain low-pass filter to the columns of \code{X}.
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lp.R
\name{lp_vector}
\alias{lp_vector}
\title{First-order low-pass filtering}
\usage{
lp_vector(x, a1)
}
\arguments{
\item{x}{vector.}
\item{a1}{The low-pass filter coefficient.}
}
\value{
The low-pass filtered vector
}
\description{
First-order low-pass filtering of a time series vector.
}
\details{
This function applies a first order unity gain low-pass filter vector.
The \code{lp_vector_cpp} function does the same much faster.
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment