~l3on/ubuntu/precise/rkward/rebuild1

« back to all changes in this revision

Viewing changes to rkward/plugins/distributions/negative_binomial_probabilities.js

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2009-10-26 14:30:00 UTC
  • mfrom: (1.1.13 upstream) (6.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091026143000-wzwt6cryjnwce23k
Tags: 0.5.2-1
* new upstream release
  closes: #551306 (added support for the new dynamic help system)
* Add "DM-Upload-Allowed: yes" in control
* bump standards version to 3.8.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// globals
 
2
var q;
 
3
 
 
4
 
 
5
function calculate () {
 
6
                q = "c (" + preg_replace ("/[, ]+/", ", ", getValue ("q")) + ")";
 
7
 
 
8
 
 
9
echo ('result <- (pnbinom (q = ' + q + ', size = ' + getValue ("size") + ', prob = ' + getValue ("prob") + ', ' + getValue ("tail") + ', ' + getValue("logp") + '))\n');
 
10
}
 
11
 
 
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');
 
15
}
 
16