split_variable_into_positive_and_negative_parts: Split variable into positive and negative parts

Description Usage Arguments Value

View source: R/utility.R

Description

Generally, the range of the input value of stacked chart is greater than or equal to zero. This function splits variable into positive and negative parts in order to include negative values to stacked chart.

Usage

1
2
3
4
5
6
7
8
split_variable_into_positive_and_negative_parts(
  df_all,
  domain_column_name,
  variable_column_name,
  value_column_name,
  variable_name_converter = function(x) {     paste(x, "_negative", sep = "") },
  increment_of_domain_in_interpolation = 0.1
)

Arguments

df_all

input data frame

domain_column_name

domain column name, such as year

variable_column_name

variable column name, such as 'coal'

value_column_name

value column name, such as 'val'

variable_name_converter

function which convert original variable name into its negative part name

increment_of_domain_in_interpolation

step size for interpolation

Value

modified data frame


UTokyo-mip/mipplot documentation built on Aug. 7, 2021, 6:25 p.m.