5
function calculate () {
6
q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
9
echo ('result <- (pnbinom (q = ' + q + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
12
function printout () {
13
echo ('rk.header ("Negative Binomial probability", list ("Vector of quantiles", "' + q + '", "Size", "' + getValue ("size") + '", "Probability of success in each trial", "' + getValue ("prob") + '", "Tail", "' + getValue ("tail") + '", "Probabilities p are given as", "' + getValue ("logp") + '"))\n');
14
echo ('rk.results (result, titles="Negative Binomial probabilities")\n');