2
function preprocess () {
5
function calculate () {
9
?>rk.header ("Plot density <? getRK ("function"); ?>", list ("Number of Observations", "<? getRK ("n"); ?>", "Minimum", "<? getRK ("min"); ?>", "Maximum", "<? getRK ("max"); ?>", "Mean", "<? getRK ("mean"); ?>", "Standard Deviation", "<? getRK ("sd"); ?>", "Function", "<? getRK ("function"); ?>"));
12
plot (<? getRK ("function"); ?> (seq(<? getRK ("min"); ?> ,<? getRK ("max"); ?>, length= <? getRK ("n"); ?>) , mean = <? getRK ("mean"); ?>, sd = <? getRK ("sd"); ?>))
2
include ("plot_dist_common.php");
4
function getParameters () {
7
$options['mean'] = getRK_val ("mean");
8
$options['sd'] = getRK_val ("sd");
9
getContRangeParameters ();
11
if ($options['is_density']) {
12
$options['fun'] = "dnorm";
14
$options['fun'] = "pnorm";
18
function doHeader () {
21
echo ('rk.header ("Normal ' . $options['label'] . ' function", list ("Number of Observations", "' . $options['n'] . '", "Lower quantile", "' . $options['min'] . '", "Upper quantile", "' . $options['max'] . '", "Mean", "' . $options['mean'] . '", "Standard Deviation", "' . $options['sd'] . '"' . $options['log_label'] . $options['tail_label'] . ', "Function", "' . $options['fun'] . '"));' . "\n");
24
function doFunCall () {
27
echo ($options['fun'] . '(x, mean=' . $options['mean'] . ', sd=' . $options['sd'] . $options['log_option'] . $options['tail_option'] . ')');