View source: R/getChartStatus.R
getChartStatus | R Documentation |
Checks a chart's status when column-level chart specifications are provided in chart$dataSpec. Note that safetyGraphicsApp() does not allow a mapping
value that is not found in domainData
, so this function only needs to check that an expected parameter exists in mapping
(not that the specified column is found in the loaded data).
getChartStatus(chart, mapping)
chart |
chart object |
mapping |
the current mapping data.frame |
Returns a list, with:
status
(TRUE, FALSE)
domains
a list specifying wheter all columns are specified in each domain
columns
a list that matches the structure of chart$dataSpec and indicates which variables are available.
a list with status
, domains
and columns
properties
sample_chart <- list(
domains=c("aes","dm"),
dataSpec=list(
aes=c("id_col","custom_col"),
dm=c("id_col","test_col")
)
)
sample_mapping <- data.frame(
domain=c("aes","aes","dm","dm"),
text_key=c("id_col","custom_col","id_col","test_col"),
current=c("myID","AEcol","myID","dmCol")
)
check <- safetyGraphics:::getChartStatus(chart=sample_chart, mapping=sample_mapping)
# check$status=TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.