Learn R Programming

errint (version 1.0)

df_intervals: Data Frames of Intervals

Description

df_intervals creates an object of class c("df_intervals", "data.frame").

as.df_intervals attempts to coerce its argument x into an object of class c("df_intervals", class(x)). If this is not possible x is returned unchanged.

is.df_intervals returns TRUE if x is an R object with "df_intervals" as one of its classes. It returns FALSE otherwise.

Usage

df_intervals(distributions, errs)
as.df_intervals(x)
is.df_intervals(x)

Arguments

distributions
vector containing the names of the distribution correspondind to each error.
errs
vector of errors associated to intervals built under a particular distribution assumption indicated by 'distributions'.
x
an R object.

Value

df_intervals returns an object of class c("df_intervals", "data.frame") with information regarding the error of intervals built under different distribution assumptions.as.df_intervals returns an object of class c("df_intervals",class(x)) with information contained in x if possible. Returns x otherwise.is.df_intervals returns TRUE if x is an R object with "df_intervals" as one of its classes. FALSE otherwise.

References

Link to the scientific paper

Prada, Jesus, and Jose Ramon Dorronsoro. "SVRs and Uncertainty Estimates in Wind Energy Prediction." Advances in Computational Intelligence. Springer International Publishing, 2015. 564-577,

with theoretical background for this package is provided below.

http://link.springer.com/chapter/10.1007/978-3-319-19222-2_47

Examples

Run this code
df_intervals("l",0.1)

df_intervals(c("l","lm","n","nm","b","w"),rep(0.1,6))


df<-data.frame(distribution=rnorm(10),error=rnorm(10))
as.df_intervals(df)

v<-c("a","b")
as.df_intervals(v)


df<-data.frame(distribution=rnorm(10),error=rnorm(10))
is.df_intervals(df)
res<-as.df_intervals(df)
is.df_intervals(res)

Run the code above in your browser using DataLab