5
function calculate () {
6
q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
8
echo ('result <- (pgamma (q = ' + q + ', shape = ' + getValue ("shape") + ', rate = ' + getValue ("rate") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
11
function printout () {
12
echo ('rk.header ("Gamma probability", list ("Vector of quantiles", "' + q + '", "Shape", "' + getValue ("shape") + '", "Rate", "' + getValue ("rate") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n');
13
echo ('rk.results (result, titles="Gamma probabilities")\n');