initialize,DataSet-method | R Documentation |
Uses the constructors to create the object with its properties or updates an existing one with the setters.
## S4 method for signature 'DataSet' initialize( .Object, compared = FALSE, dataProvider, fieldMappings, stockEvents, ... ) dataSet(compared = FALSE, dataProvider, fieldMappings, stockEvents, ...) ## S4 method for signature 'DataSet,ANY,ANY' setDataProvider(.Object, dataProvider, keepNA = TRUE) setFieldMappings(.Object, fieldMappings) ## S4 method for signature 'DataSet,list' setFieldMappings(.Object, fieldMappings) addFieldMapping(.Object, ...) ## S4 method for signature 'DataSet' addFieldMapping(.Object, ...) setStockEvents(.Object, stockEvents) ## S4 method for signature 'DataSet,list' setStockEvents(.Object, stockEvents) addStockEvent(.Object, stockEvent = NULL, ...) ## S4 method for signature 'DataSet,StockEventOrMissing' addStockEvent(.Object, stockEvent = NULL, ...)
.Object |
DataSet. |
compared |
|
dataProvider |
|
fieldMappings |
|
stockEvents |
StockEvent. |
... |
other properties of DataSet. |
keepNA |
|
stockEvent |
StockEvent.
Argument for method |
(updated) DataSet object
new("DataSet") dataSet(categoryField = "categoryField") setDataProvider(.Object = dataSet(), data.frame(key = c("FR", "US"), value = c(20,10))) dataset <- addFieldMapping(.Object = dataSet(), fieldMappings = list(fromField ="val1", toField ="value")) print(dataset) dataset <- addFieldMapping(.Object = dataSet(), fromField ="val1", toField ="value") print(dataset) addStockEvent(.Object = dataSet(), backgroundAlpha = 1, backgroundColor = "#DADADA") # equivalent to: stockEvent_obj <- stockEvent(backgroundAlpha = 1, backgroundColor = "#DADADA") chart <- addStockEvent(.Object = dataSet(), stockEvent = stockEvent_obj); print(chart)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.