Library for data smoothing using interpolating splines
Load the library if installed.
The library consists one testing dataframe with two numeric columns x
and y
.
CERN
, where CERN$x = [1, 2, ..., 277]
,and five public functions
cics_unif_explicit(...)
- create and plot the uniform explicit spline,
cics_unif_explicit(
uumin = CERN$x[1], # start spline at this x-coordinate
uumax = CERN$x[10], # finish spline at this x-coordinate
yy = CERN$y[1:10], # y-coordinates for spline control points
d = c(0,0), # derivateves at points (uumin, yy[1]) and (uumax, yy[length(yy)])
xlab="X axis", # x-axis label
ylab="Y axis" # y-axis label
)
cics_unif_explicit_smooth(...)
- create and plot the uniform explicit spline as smoothing curve,
cics_explicit(...)
- create and plot the explicit spline,
cics_explicit_smooth(...)
- create and plot the explicit spline as smoothing curve,
cics_explicit_smooth(
xx = CERN$x, # x-coordinates to smooth
yy = CERN$y, # y-coordinates to smooth
uu = c(1, 4, 7, 20, 41, 57, 86, 92, 101, 121, 220, 245, 261, 277), # # x-coordinates for spline control points. uu[1] == xx[1] and uu[length(uu)] == xx[length(xx)]
d = c(0, 1), # derivateves at points (uumin, yy[1]) and (uumax, yy[length(yy)])
xlab = "X axis", # x-axis label
ylab = "Y axis"
)
forecast_demo()
- demo showing a usage of an explicit spline to forecast some data. See the commented source code of the function for more details about the functionality.
On Windows Windows run in R console (or RStudio)
On Linux (Ubuntu) install first these packages
In both cases then run in R console
devtools::install_github("klutometis/roxygen", force = TRUE)
library(roxygen2)
install.packages("digest")
library(digest)
install.packages("polynom")
library(polynom)
install.packages("ggplot2")
library(ggplot2)
Open system terminal in the parent directory of the package and type
OR Open RStudio and install this library using top menu button Build->Install and Restart.