1 | resultsTable(datasetInput)
|
datasetInput |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (datasetInput)
{
results <- try(as.character(datasetInput[[2]]))
if (class(results) == "try-error")
results <- c("", "", "", "", "", "", "")
else {
rounddecimals <- c(0, 2, 0, 2, 0, 0, 3)
roundedvalues <- round(datasetInput[[2]], rounddecimals)
for (i in 1:length(rounddecimals)) {
results[i] <- as.character(format(roundedvalues[i],
big.mark = ",", scientific = F))
}
}
data.frame(Quantity = c("Mean Loss Cost", "Ratio of Letter of Credit (LoC) Required to the Mean",
"Required LoC", "Ratio of Aggregate Deductible to the Mean",
"Aggregate Deductible", "Expected Number of Claims (Ground up)",
"Simulation run time (s)"), Value = results, stringsAsFactors = FALSE)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.