AbsorptionGraphic: Plotting absorption by plant and value stream

Description Usage Arguments Value Examples

View source: R/AbsorptionGraphicFunction.R

Description

Creates a stacked bar chart of absorption numbers by value stream. The plot is facetted by plant and provides 2 points for comparison. The chart can be used to compare actuals against a forecast or two forecasts.

Usage

1
2
AbsorptionGraphic(x, labels, barwidth = 0.7, col = c(rgb(192, 0, 0,
  maxColorValue = 255), rgb(166, 166, 166, maxColorValue = 255)))

Arguments

x

dataframe with 4 columns. The columns should be as follows:

  • Value Stream- these shoule be abbreviations. The values will be used as labels on the chart

  • Comparable- this is likely the actuals or new forecast

  • Comparable- this is likely the forecast or old forecast

  • Plant- Abbreviation of the plant name. One of Rar, Roc, or Penc

labels

vector of lenghth two. Labels for the stacked bars

barwidth

width of bars

col

color scheme

Value

ggpplot object

Examples

1
2
3
4
5
dat<- data.frame(VS= paste0("VS", 1:3),
                 comp1= c(4:6)*1000,
                 comp2= c(5:7)*1000,
                 Plant= rep("Rar",3))
AbsorptionGraphic(dat, c("FCST","ACT"))

kuhnrl30/Ortho documentation built on May 20, 2019, 7:06 p.m.