crypto_xts: crypto_xts

Description Usage Arguments Value Note Examples

Description

Converts the getCoins() dataframe into an xts object. Provide frequency to summarise into specific time periods.

Usage

1

Arguments

df

data.frame from getCoins()

frequency

string ?round_date for help

Value

xts

Note

Each value in frequency <- c('second', 'minute', 'hour', 'day', 'week', 'month', 'year') can have an integer in front of it to retrieve the expressed time period. i.e. 3month

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  ## Not run: 
 You can lookup additional frequencies at \code{?round_date}
 from the lubridate package.
    crypto_xts(df, '.5s')
    crypto_xts(df, 'sec')
    crypto_xts(df, 'second')
    crypto_xts(df, 'minute')
    crypto_xts(df, '5 mins')
    crypto_xts(df, 'hour')
    crypto_xts(df, '2 hours')
    crypto_xts(df, 'day')
    crypto_xts(df, 'week')
    crypto_xts(df, 'month')
    crypto_xts(df, 'bimonth')
    crypto_xts(df, '3 months')
    crypto_xts(df, 'halfyear')
    crypto_xts(df, 'year')

## End(Not run)

JesseVent/crypto documentation built on May 12, 2019, 8:40 a.m.