metis.chart: metis.chart

Description Usage Arguments Value Examples

View source: R/metis.chart.R

Description

This function produce different kinds of charts for the metis package. iIt requires a table in the Metis format. Each figure is accompanied with a csv table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
metis.chart(data, chartType = "bar", position = "stack", xData = "x",
  yData = "value", class = "class1", group = "scenario",
  classPalette = "classPalette1", classLabel = "classLabel1",
  xLabel = "xLabel", yLabel = "yLabel", facet_rows = "region",
  facet_columns = "scenario", ncolrow = 4, scales = "fixed",
  useNewLabels = 0, units = "units", xBreaksMaj = 10,
  xBreaksMin = 5, yBreaksMajn = 5, yBreaksMinn = 10,
  sizeBarLines = 0.5, sizeLines = 1.5, printFig = T,
  fileName = "chart", dirOutputs = paste(getwd(), "/outputs", sep =
  ""), figWidth = 13, figHeight = 9, pdfpng = "png")

Arguments

data

data table for charting

chartType

Type of chart: "bar" or "line"

position

Position in bar charts. "identity", "stack" or "dodge"

xData

Default "x"

yData

Default "value"

class

Default "class1"

group

Default "scenario"

classPalette

Default "classPalette1"

classLabel

Default "classLabel1"

xLabel

Default "xLabel"

yLabel

Default "units"

facet_rows

Default "region"

facet_columns

Default "scenario"

ncolrow

Number of columns or Rows for Faceted plots

scales

Default "fixed"

useNewLabels

Default 0

units

Default "units"

xBreaksMaj

Default 10

xBreaksMin

Default 5

yBreaksMajn

Default 5

yBreaksMinn

Default 10

sizeBarLines

Default 0.5

sizeLines

Default 1.5

printFig

Default = T,

fileName

Default = "map",

dirOutputs

Default = paste(getwd(),"/outputs",sep Default = "")

figWidth

Default = 9,

figHeight

Default = 7,

pdfpng

Default = "png",

Value

Returns the formatted data used to produce chart

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Examples below show the default chart with minimum information
# and then adding progressively more details.

library(tibble)
library(dplyr)
tbl <- tribble (
~x,     ~value,
2010,   15,
2020,   20,
2030,   30
)
metis.chart(data=tbl,xData="x",yData="value",chartType = "line")
metis.chart(data=tbl,xData="x",yData="value",chartType = "bar")

zarrarkhan/srn documentation built on May 21, 2019, 4:07 a.m.