dat: Link data to the chart

Description Usage Arguments Examples

View source: R/lc.R

Description

dat allows linking variables from the current environment to chart's properties. On every updateCharts call, all the data provided via the dat function will be automatically re-evaluated, and the chart will be changed accordingly. One can also put properties outside of the dat function to prevent their re-evaluation. It can also be used to ensure re-evaluation of the with argument of any plotting function.

Usage

1

Arguments

...

List of name-value pairs to define the properties.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
lc_scatter(dat(x = rnorm(30)), y = rnorm(30))
#note that the Y values remain the same after each updateCharts call
updateCharts()

#This way the dataset is not strored inside the chart and will be re-evaluated
data("iris")
lc_scatter(dat(x = Sepal.Length, y = Petal.Length), with = dat(iris))

iris <- iris[1:10, ]
updateCharts()

rlc documentation built on Jan. 5, 2022, 1:11 a.m.

Related to dat in rlc...