show_mc_results: Visualization of Monte Carlo Simulation Results

View source: R/monte_carlo.R

show_mc_resultsR Documentation

Visualization of Monte Carlo Simulation Results

Description

Displays the outcomes of the Monte Carlo simulation for a specific Node as a bar chart, showcasing the frequency of each result. Furthermore, the lengths of the bars are saved in a .csv file titled "MC bar lengths.csv".

Usage

show_mc_results(node, mc_results, num_runs, save = NULL)

Arguments

node

Node object representing the node of interest in the simulation.

mc_results

matrix containing the Monte Carlo simulation results.

num_runs

numeric indicating the number of Monte Carlo simulations that were executed.

save

character indicating where to save the graphic. By default, save is NULL and don't save the graphic.

Value

A vector depicting the data used in the bar chart.

Examples

tree <- dexisensitivity::masc2
MC <- monte_carlo(tree, 100)
show_mc_results(tree@Nodes[[2]], MC, 100)


dexisensitivity documentation built on Oct. 30, 2024, 1:08 a.m.