Coca-Cola
Diet Coke
Coke Zero
Pepsi
Pepsi Max
1
0
1
0
0
1
2
1
0
1
1
1
3
1
1
0
0
0
4
1
0
0
0
0
5
0
1
0
0
0
6
0
0
0
0
1
7
0
0
1
0
0
8
1
0
1
0
1
9
1
1
0
1
0
Showing 1 to 9 of 327 rows.
StartPreviousNextEnd
># VERSION 1.1.3
>library(flipChart)
># Processing all the selections from the 'Inputs' and 'Charts' tab.
>pd <- PrepareData(formChartType,  QFilter, QPopulationWeight, input.data.table = get0("formTable"), input.data.tables = get0("formTables"), input.data.raw = list(X = get0("formX"), Y = get0("formY"), Z1 = get0("formZ"), Z2 = get0("formZ2"), labels = get0("formScatterLabels")), input.data.pasted = list(get0("formPastedData"), get0("formPastedFactor"),  get0("formPastedColumnNames"), get0("formPastedRowNames")), input.data.other = get0("formOther"), data.source = get0("formDataSource"), first.aggregate = get0("formFirstAggregate", ifnotfound = FALSE),  group.by.last = get0("formGroupByLastColumn", ifnotfound = FALSE), tidy = get0("formTidy", ifnotfound = FALSE), transpose = get0("formTranspose"), row.names.to.remove = get0("formIgnoreRows"), column.names.to.remove = get0("formIgnoreColumns"), hide.empty.rows.and.columns = get0("formHideEmpty", ifnotfound = FALSE), as.percentages = get0("formAsPercentages", ifnotfound = FALSE), show.labels = !get0("formNames", ifnotfound=TRUE), date.format = get0("formDateFormat", ifnotfound = "Automatic"), scatter.input.columns.order = get0("formScatterFormat"))
>pc <- PrepareColors(pd$data, formChartType, scatter.colors.column = pd$scatter.variable.indices["colors"], palette = get0("formPalette"), palette.custom.color = get0("formCustomColor"), palette.custom.gradient.start = get0("formCustomGradientStart"), palette.custom.gradient.end = get0("formCustomGradientEnd"), palette.custom.palette = get0("formCustomPalette"), fit.palette = get0("formFitPalette"), fit.palette.custom.color = get0("formFitCustomColor"), fit.palette.custom.gradient.start = get0("formFitCustomGradientStart"), fit.palette.custom.gradient.end = get0("formFitCustomGradientEnd"), fit.palette.custom.palette = get0("formFitCustomPalette"), subslice.palette = get0("formSubslicePalette"), subslice.palette.custom.color = get0("formSubsliceCustomColor"), subslice.palette.custom.gradient.start = get0("formSubsliceCustomGradientStart"), subslice.palette.custom.gradient.end = get0("formSubsliceCustomGradientEnd"), subslice.palette.custom.palette = get0("formSubsliceCustomPalette")) 
>pn <- PrepareNumbers(categories.format.list = list(get0("formCategoriesNumberType"), get0("formCategoriesDateType"), get0("formCategoriesNumberCustom"), get0("formCategoriesSeparateThousands"), get0("formCategoriesDecimals")), values.format.list = list(get0("formValuesNumberType"), get0("formValuesDateType"), get0("formValuesNumberCustom"), get0("formValuesSeparateThousands"), get0("formValuesDecimals")), hover.format.list = list(get0("formHoverNumberType"), get0("formHoverDateType"), get0("formHoverNumberCustom"), get0("formHoverSeparateThousands"), get0("formHoverDecimals")), data.labels.format.list = list(get0("formDataLabelNumberType"), get0("formDataLabelDateType"), get0("formDataLabelCustom"), get0("formDataLabelSeparateThousands"), get0("formDataLabelDecimals")), !is.null(attr(pd$data, "statistic")) && grepl("%", attr(pd$data, "statistic"), fixed = TRUE))
>
># Creating the chart.
>chart.3 <- if(formChartType== "Table") pd$data else CChart(chart.type = formChartType,
    x = pd$data,
    weights = pd$weights,
    max.label.length = 0,
    #Scatter plot inputs.
    scatter.max.labels = get0("formScatterMaxLab", ifnotfound=20),
    scatter.labels.as.hovertext= if (exists("formScatterLabelType")) formScatterLabelType!="On chart" else TRUE,
    scatter.colors.as.categorical = if (exists("formScatterColorType")) formScatterColorType=="Categories" else TRUE,
    scatter.sizes.as.diameter = if (exists("formScatterSizeType")) formScatterSizeType=="Diameter" else FALSE,
    scatter.x.column = pd$scatter.variable.indices["x"],
    scatter.y.column = pd$scatter.variable.indices["y"],
    scatter.sizes.column = pd$scatter.variable.indices["sizes"],
    scatter.colors.column = pd$scatter.variable.indices["colors"],
    trend.lines = get0("formTrendLines", ifnotfound=FALSE),
    logos = get0("formLogos"),
    logo.size = get0("formLogoSize"),
    # Chart: DATA SERIES
    colors = pc$series.colors,
    pie.subslice.colors = pc$subslice.colors,
    # Chart: FIT LINE
    fit.type = get0("formFit", ifnotfound="None"),
    fit.ignore.last = get0("formFitIgnoreLast"),
    fit.line.type = get0("formFitLineType"),
    fit.line.colors = pc$fit.line.colors,
    fit.line.width = get0("formFitLineWidth", ifnotfound=1),
    # Chart: DATA LABELS
    data.label.show = get0("formDataLabelShow", ifnotfound = FALSE),
    data.label.format = pn$data.labels.number.format,
    data.label.font.size = get0("formDataLabelFontSize", ifnotfound = 10),
    data.label.font.family = get0("formDataLabelFontFamily", ifnotfound = get0("formFont")),
    data.label.font.color = get0("formDataLabelFontColor"),
    data.label.prefix = get0("formPrefix", ifnotfound=""),
    data.label.suffix = get0("formSuffix", ifnotfound=""),
    data.label.position = get0("formDataLabelPosition", ifnotfound="top middle"),
    data.label.align.horizontal = get0("formDataLabelHorizAlign", ifnotfound="Default"),
    # Chart: FONT
    global.font.family = get0("formFont"),
    global.font.color = get0("formFontColor"),
    #Chart: GRIDLINES
    grid.show = get0("formShowGrid", ifnotfound=TRUE),
    # Chart: LEGEND
    legend.show = get0("formLegendShow", ifnotfound=TRUE),
    legend.title = get0("formLegendTitle"),
    legend.font.family = get0("formLegendFontFamily"),
    legend.font.color = get0("formLegendFontColor"),
    legend.font.size = get0("formLegendFontSize"),
    legend.x.position = get0("formLegendXPos", ifnotfound=1.02),
    legend.y.position = get0("formLegendYPos", ifnotfound=1.0),
    legend.width = get0("formLegendWidth", ifnotfound=250),
    # Chart: TITLE
    title = get0("formTitle", ifnotfound=""),
    title.font.family = get0("formTitleFontFamily"),
    title.font.color = get0("formTitleFontColor"),
    title.font.size = get0("formTitleFontSize"),
    subtitle = get0("formSubtitle", ifnotfound=""),
    subtitle.font.family = get0("formSubtitleFontFamily"),
    subtitle.font.color = get0("formSubtitleFontColor"),
    subtitle.font.size = get0("formSubtitleFontSize"),
    footer = get0("formFooter", ifnotfound=""),
    footer.font.family = get0("formFooterFontFamily"),
    footer.font.color = get0("formFooterFontColor"),
    footer.font.size = get0("formFooterFontSize"),
    footer.wrap = get0("formFooterWrap", ifnotfound=FALSE),
    footer.wrap.nchar = get0("formFooterWrapNchar"),
    #Chart: CATEGORIES_AXIS
    categories.axis.show = get0("formCategoriesAxisShow", ifnotfound=TRUE),
    categories.tick.show = get0("formCategoriesAxisShow", ifnotfound=TRUE),
    categories.tick.format = pn$categories.number.format,
    categories.tick.prefix = paste0("", get0("formCategoriesPrefix"), get0("formCategoriesCurrency")),    # currency is just another prefix
    categories.tick.suffix = get0("formCategoriesSuffix", ifnotfound=""),
    categories.tick.interval = get0("formCategoriesTickInterval", ifnotfound=0),
    categories.tick.units = get0("formCategoriesTickUnits"),
    categories.title = paste0("", if (sum(nchar(get0("formCategoriesTitle"))) > 0) formCategoriesTitle else pd$categories.title),
    categories.title.font.family = get0("formCategoriesTitleFontFamily"),
    categories.title.font.color = get0("formCategoriesTitleFontColor"),
    categories.title.font.size = get0("formCategoriesTitleFontSize"), 
    categories.tick.font.family = get0("formCategoriesTickFontFamily"),
    categories.tick.font.color = get0("formCategoriesTickFontColor"),
    categories.tick.font.size = get0("formCategoriesTickFontSize", ifnotfound=10),
    categories.tick.angle = if (!exists("formCategoriesTickAngle")) NULL else switch(get0("formCategoriesTickAngle"), Automatic=NULL, Horizontal=0, Vertical=90, Diagonal=45),
    categories.tick.label.wrap = get0("formLabelWrap", ifnotfound=FALSE),
    categories.tick.label.wrap.nchar = get0("formLabelWrapNchar", ifnotfound=100),
    categories.tick.align.horizontal = get0("formCategoriesTickHorizAlign", ifnotfound = "Default"),
    #Chart: VALUES_AXIS
    values.axis.show = get0("formValuesAxisShow"),
    values.tick.show = get0("formValuesAxisShow", ifnotfound=TRUE),
    values.tick.format = pn$values.number.format,
    values.tick.prefix = paste0("", get0("formValuesPrefix"), get0("formValuesCurrency")),    # currency is just another prefix
    values.tick.suffix = get0("formValuesSuffix", ifnotfound=""),
    values.title = paste0("", if (sum(nchar(get0("formValuesTitle"))) > 0) formValuesTitle else pd$values.title),
    values.title.font.family = get0("formValuesTitleFontFamily"),
    values.title.font.color = get0("formValuesTitleFontColor"),
    values.title.font.size = get0("formValuesTitleFontSize"),
    values.number.ticks = get0("formValuesNumberTicks"),
    values.tick.font.size = get0("formValuesTickFontSize", ifnotfound=10),
    values.tick.font.family = get0("formValuesTickFontFamily"),
    values.tick.font.color = get0("formValuesTickFontColor"),
    # Chart: HOVER
    values.hovertext.format = pn$hover.number.format,
    # Chart: MARGINS
    margin.top = get0("formMarginTop"),
    margin.left = get0("formMarginLeft"),
    margin.bottom = get0("formMarginBottom"),
    margin.right = get0("formMarginRight"),
    # Chart: APPEARANCE
    type = if(get0("formStackSeries", ifnotfound=FALSE)) "Stacked" else (if(formChartType == "Donut") "Donut" else formChartType),
    adjust = get0("formBandwidth"),
    automatic.lower.density = get0("formAutomaticLower"),
    pie.inner.radius = get0("formPieRadius"),
    pie.border.color = get0("formBorderColor"),
    density.color = get0("formDensityColor"),
    vertical = get0("formVertical"),
    show.mean = get0("formShowMean"),
    show.median = get0("formShowMedian"),
    show.quartiles  = get0("formShowQuartiles"),
    show.range = get0("formShowRange"),
    show.values = get0("formShowValues", ifnotfound = FALSE),
    histogram.cumulative = get0("formHistogramCumulative"),
    histogram.counts = get0("formHistogramCounts"),
    maximum.bins = get0("formMaximumBins"),
    box.points = get0("formBoxPoints"),
    mean.color = get0("formMeanColor"),
    median.color = get0("formMedianColor"),
    quartile.color =  get0("formQuartilesColor"),
    range.color =  get0("formRangeColor"),
    values.color =  get0("formValuesColor"),
    window.start = get0("formWindowStart"),
    range.bars = get0("formRangeBars"),
    line.thickness = get0("formLineThickness"),
    # BarPictograph parameters
    image = get0("formIcon"),
    custom.image = get0("formCustomIcon"),
    base.image = get0("formBaseImage", ifnotfound = ""), 
    hide.base.image = get0("formHideBase", ifnotfound = FALSE),
    base.icon.color = get0("formBaseColor", ifnotfound = ""),
    scale = if (exists("formIconScale")) as.numeric(formIconScale), 
    total.icons = if (exists("formTotalIcons")) as.numeric(formTotalIcons),
    icon.ncol = if (exists("formIconNCol")) as.numeric(formIconNCol),
    fix.icon.nrow = get0("formFixNRows", ifnotfound = TRUE),
    fill.direction = get0("formFillDirection"),
    label.color.asIcon = get0("formLabelColorAsIcon", ifnotfound = FALSE),
    categories.tick.align = get0("formCategoriesTickAlign"),
    pad.row = get0("formIconPadding", ifnotfound = 0),
    graphic.width.inch = QOutputSizeWidth,
    graphic.height.inch = QOutputSizeHeight,
    # GeographicMap parameters
    mapping.package = get0("formMapPackage"),
    high.resolution = get0("formHighRes", ifnotfound = TRUE),
    treat.NA.as.0 = get0("formNAasZero", ifnotfound = FALSE),
    color.NA = get0("formNAColor"),     
    ocean.color = get0("formOceanColor"),
    # Heat parameters
    sort.rows = get0("formSortRows"),
    sort.columns = get0("formSortColumns"),
    standardization = get0("formStandardization"),
    left.columns = get0("formLeftColumns"),
    left.column.headings = get0("formLeftColumnHeadings"),
    right.columns = get0("formRightColumns"),
    right.column.headings = get0("formRightColumnHeadings"),
    # General arguments
    warn.if.no.match = FALSE)
    Coca-Cola Diet Coke Coke Zero Pepsi Pepsi Max
1           0         1         0     0         1
2           1         0         1     1         1
3           1         1         0     0         0
4           1         0         0     0         0
5           0         1         0     0         0
6           0         0         0     0         1
7           0         0         1     0         0
8           1         0         1     0         1
9           1         1         0     1         0
10          1         1         1     1         0
11          1         0         0     1         0
12          1         0         0     1         0
13          1         0         0     0         0
14          0         0         1     0         1
15          0         1         0     1         0
16          1         1         1     1         0
17          1         1         1     0         0
18          1         0         0     1         0
19          1         0         1     0         0
20          0         0         1     0         0
21          1         0         0     1         1
22          1         0         1     1         1
23          0         1         0     0         0
24          1         0         0     1         0
25          1         0         0     0         0
26          1         0         1     1         0
27          1         1         0     0         1
28          0         0         0     0         1
29          1         0         1     1         0
30          1         0         0     1         0
31          1         0         1     1         1
32          1         0         0     0         1
33          1         0         0     1         0
34          1         1         0     0         0
35          1         0         0     1         0
36          1         0         0     0         0
37          0         1         1     0         1
38          1         0         0     1         1
39          1         0         1     1         1
40          1         0         0     1         0
41          0         1         0     0         0
42          1         0         0     1         0
43          0         0         1     0         1
44          1         1         0     0         0
45          1         0         0     0         0
46          1         0         0     0         0
47          1         1         1     1         1
48          1         0         0     1         0
49          1         1         1     0         0
50          1         0         0     1         0
51          1         0         1     0         0
52          1         0         0     0         1
53          1         1         1     1         1
54          1         0         0     0         0
55          1         0         0     0         0
56          1         0         0     1         0
57          0         1         0     0         1
58          1         0         0     1         0
59          1         0         1     1         1
60          1         0         1     1         0
61          1         0         0     0         0
62          1         1         1     0         0
63          1         1         0     1         1
64          1         0         0     1         0
65          0         0         1     1         1
66          1         1         0     0         0
67          1         0         0     0         1
68          0         0         0     0         0
69          0         0         1     0         1
70          1         0         0     0         0
71          0         0         1     0         1
72          1         0         0     0         0
73          0         0         0     0         0
74          1         1         1     0         0
75          1         0         1     0         0
76          1         0         1     0         0
77          0         1         1     0         1
78          0         0         0     0         0
79          0         1         1     0         0
80          1         1         1     1         1
81          1         1         1     0         1
82          1         0         0     0         1
83          1         0         0     0         0
84          1         0         0     0         0
85          1         0         0     1         0
86          1         0         0     1         1
87          1         0         1     1         0
88          0         1         1     0         1
89          1         0         0     0         0
90          0         0         0     1         0
91          1         1         1     1         0
92          1         0         1     0         0
93          0         0         0     0         0
94          1         0         0     1         0
95          1         0         0     0         0
96          0         1         1     0         1
97          1         1         1     1         1
98          1         0         0     1         0
99          1         1         1     0         0
100         1         0         1     0         0
101         1         1         1     1         1
102         1         0         0     0         0
103         0         1         0     0         0
104         1         0         0     1         1
105         1         1         1     1         1
106         1         1         0     1         1
107         1         1         0     1         1
108         1         1         1     1         1
109         1         0         1     1         1
110         0         1         0     0         1
111         1         0         0     1         1
112         1         0         1     1         1
113         1         0         0     1         1
114         1         0         0     0         0
115         1         0         0     0         0
116         1         0         0     1         0
117         1         0         0     0         0
118         0         1         1     0         1
119         1         0         0     1         0
120         1         0         0     0         0
121         1         0         0     0         0
122         1         1         1     1         0
123         1         0         0     1         1
124         1         0         0     1         0
125         0         0         0     0         1
126         1         0         0     0         0
127         0         1         0     0         1
128         1         0         0     1         0
129         1         1         1     0         1
130         1         1         1     1         1
131         0         0         0     0         0
132         1         1         0     1         1
133         0         0         0     0         1
134         1         0         0     1         0
135         0         1         1     1         1
136         1         0         0     1         0
137         1         1         1     1         1
138         1         1         0     0         1
139         0         0         0     0         1
140         1         0         0     0         0
141         1         1         1     1         1
142         1         0         0     1         1
143         1         1         1     0         1
144         1         0         1     1         1
145         1         0         1     0         1
146         1         0         0     0         0
147         1         0         1     1         1
148         1         0         1     0         0
149         1         0         0     0         0
150         1         0         1     0         1
151         1         1         1     0         1
152         1         0         1     1         1
153         0         0         0     0         0
154         1         0         0     1         1
155         1         0         0     0         0
156         1         0         1     1         0
157         1         1         1     0         0
158         0         1         0     0         0
159         1         0         0     0         0
160         1         0         1     1         1
161         1         0         1     1         1
162         1         1         1     0         0
163         1         0         0     1         1
164         0         1         1     0         0
165         1         1         1     1         1
166         1         1         0     0         0
167         1         0         0     1         0
168         0         0         0     1         0
169         1         1         0     0         0
170         0         1         0     0         0
171         0         0         1     0         1
172         0         1         1     0         1
173         1         0         0     1         0
174         1         0         1     1         1
175         0         0         1     1         1
176         0         0         0     1         1
177         1         0         0     0         1
178         0         0         1     1         1
179         1         0         1     1         1
180         1         0         0     0         0
181         1         1         0     0         0
182         1         0         0     1         0
183         1         1         1     1         1
184         1         1         1     1         0
185         0         0         1     1         0
186         1         0         0     0         0
187         0         0         0     0         0
188         1         1         1     1         1
189         1         0         0     0         0
190         1         0         0     1         0
191         1         0         0     1         0
192         1         0         1     0         0
193         1         0         0     0         0
194         0         0         1     0         0
195         0         0         0     0         0
196         1         1         0     0         1
197         1         0         0     1         0
198         1         0         1     1         0
199         1         0         1     1         1
200         1         1         1     1         0
 [ reached getOption("max.print") -- omitted 127 rows ]
Total time:2.24s
Time on R server:2.20s
Time evaluating code:2.04s
Bytes sent:27,705
Bytes received:70,946