Description Usage Arguments Value
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.
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
)
|
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 |
modified data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.