as.lfobj: Coerce to class lfobj

Description Usage Arguments Value See Also Examples

Description

Functions to check if object is of class lfobj or coerce it if possible. Currently, only methods for zoo and xts exist.

Usage

1
2
3
4
5
6
as.lfobj(x, ...)
is.lfobj(x)
## S3 method for class 'xts'
as.lfobj(x, ...)
## S3 method for class 'zoo'
as.lfobj(x, ...)

Arguments

x

any R object.

...

additional arguments to be passed to or from methods.

Value

An object of class lfobj.

See Also

createlfobj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(ngaruroro)
is.lfobj(ngaruroro)

# coerce zoo object to class lfobj
z1 <- zoo(1:10, order.by = seq(Sys.Date(), length.out = 10, by = "days"))
as.lfobj(z1, hyearstart = 5)

# coerce xts object to class lfobj
xts1 <- xts(1:10, order.by = seq(Sys.Date(), length.out = 10, by = "days"))
as.lfobj(xts1, hyearstart = 5)

lfstat documentation built on May 2, 2019, 6:07 p.m.