Learn R Programming

rAmCharts (version 2.1.7)

getCurrentStockData: Get data in shiny module

Description

Get data in shiny module

Usage

getCurrentStockData(data, col_date, col_series, zoom = NULL,
  maxPoints = 1000, tz = "UTC", ts = c("5 min", "10 min", "30 min",
  "hour", "3 hour", "12 hour", "day", "week", "month", "year"),
  fun_aggr = "mean", treat_missing = FALSE, maxgap = Inf,
  type_aggr = "first")

Arguments

data

: data.frame to transform

col_date

: Date column name, default to "date". Must be "POSIXct" or "CET24" colum

col_series

: Column name of quantitative variable(s) to be transformed. Default to setdiff(colnames(data), "date")

zoom

: List for init subset. NULL to keep all

maxPoints

: Maximal number of rows in results

tz

: Timezone of result. Defaut to "UTC".

ts

: Increment of the sequence. Default to "10 min". Can be a number, in seconds, or a character string containing one of "min", "hour", "day". This can optionally be preceded by a positive integer and a space

fun_aggr

: Aggregation function to use ("min", "max", "sum", "mean", "first", "last"). Default to "mean".

treat_missing

: Boolean. Default to FALSE Whether or not to interpolate missing values ? see na.approx

maxgap

: When interpolate missing values with na.approx. Maximum number of consecutive NAs to fill. Defaut to Inf.

type_aggr

: Character. Type of aggregation

  • "first" : Date/Time result is equal to minimum of sequence, and this minimum is included in aggregation

  • "last" : Date/Time result is equal to maximum of sequence, and this maximum is included in aggregation