xts_transf: Transform a numeric object into a xts one

Description Usage Arguments Examples

Description

Transform a numeric or a common non xts object into an xts object with specified period, starting from the desired year, month, day

Usage

1
xts_transf(x, year = 2018, month = 02, day = 2, hour = 11, minutes = 00, period = 60)

Arguments

x

a vector, matrix or data.frame object

year

starting year

month

starting month

day

starting day

hour

starting hour

minutes

starting minutes

period

the desired period, 60 indicates a 1 minute interval time, 300 indicates a 5 minutes time frame...

Examples

1
2
3
# This will create a 5 minutes xts object
x <- rnorm(50)
xts_transf(x, period = 300)

Michele1973/TAaUF documentation built on May 29, 2019, 4:44 a.m.