Learn R Programming

pauwels2014 (version 1.0)

compute_mean_risks: Compute an average risk as a function of credit spent

Description

Used to summarize information contained in lists given by read_knobjs.

Usage

compute_mean_risks(mean_risks, legend)

Arguments

mean_risks
A list of tables as given by read_knobjs.
legend
A label to be associated to the output data frame.

Value

A data frame with four columns: cost, the budget spent, numerical, risk, the associated risk, numerical, type, given by the legend argument and chain which is an integer associated to each table in the list argument.

Details

Summarizes results in a data frame for further ploting.

See Also

read_knobjs

Examples

Run this code
	data(knobjs)
	sapply(	
		1:length(knobjs),
		function(k){
			assign(names(knobjs)[k], knobjs[[k]], envir = .GlobalEnv)
		}
	)

	data(exps)
	temp <- read_knobjs(paste("knobjActMult", 1:10, sep=""))
	mean_risks <- compute_mean_risks(temp, "A title")
	mean_risks

Run the code above in your browser using DataLab