inst/extdata/examples/R/plot-bar-bar-dot-whisker.R

if (file.exists('bar-bar-dot-whisker.xlsx')) { # plot figures from Excel file:
  nicerplot::nplot('bar-bar-dot-whisker.xlsx')
} else if (file.exists('bar-bar-dot-whisker.RData')) { # or plot figures directly in R:
  d <- dget('bar-bar-dot-whisker.RData')
  nicerplot::nplot(d, type = c('bar--, bar--, dot, whisker, whisker'), title = c('Verwacht verlies in verschillende scenario's'), y_title = c('Verlies (mld €)'), dot_size = c(0.7), legend_n_per_column = c(4), whisker_series = c(2), style = c('default'), open = FALSE)
} else print(paste('Please download', xlsx_data_file, 'or', rdata_file, 'to create the nice R plot.'))
data-science-made-easy/nicerplot documentation built on Nov. 3, 2024, 9:23 p.m.