Learn R Programming

rsyncrosim (version 2.0.1)

chartDisagg: Disaggregates the Chart by a Y variable

Description

Disaggregates the Chart by given filter column(s) in a Y variable.

Usage

chartDisagg(chart, variable, addFilter = NULL, removeFilter = NULL)

# S4 method for Chart chartDisagg(chart, variable, addFilter = NULL, removeFilter = NULL)

Value

A Chart object representing a SyncroSim chart

Arguments

chart

Chart object

variable

character. The variable to disaggregate the Y axis by.

addFilter

character or character vector. Adds Y variable column(s) to disaggregate the chart by.

removeFilter

character or character vector. Removes Y variable column(s) from disaggregating the chart.

Examples

Run this code
if (FALSE) {
# Create a chart object
myChart <- chart(myProject, chart = "New Chart")

# Set the chart type and data
myChart <- chartData(myChart, y = c("variable1", "variable2"),
timesteps = c(0,10), iterationType = "single", iteration = 1)

# Disaggregate the chart by a filter column
myChart <- chartDisagg(myChart, variable = "variable1",
addFilter=c("col1", "col2"))

# Remove a filter column from the chart disaggregation
myChart <- chartDisagg(myChart, variable = "variable1",
removeFilter="col1")
}

Run the code above in your browser using DataLab