[RkWard-devel] including R expression...

Prasenjit Kapat kapatp at gmail.com
Mon Feb 5 22:18:10 UTC 2007


Hi,
 I would like to suggest (I had mentioned this in an earlier mail too) the 
following modification to the "interpret as R expression" in 
plot_options.php. Consider the 'main' title example. Current code is:

        //add a main (on top) to the plot
        $main = getRK_val ("main");
        if (($main != "") && (getRK_val ("mainisexp") != "1")) {
                $main = "\"" . $main . "\"";
        }
        if ($main != "") $main = ", main=" . $main;

My suggestion is:

        //add a main (on top) to the plot
        $main = getRK_val ("main");
        if ($main != "") {
                if (getRK_val ("mainisexp") == "1") {
                        $main = "expression(" . $main . ")";
                } else {
                        $main = "\"" . $main . "\"";
                }
                $main = ", main=" . $main;
        }

This will keep the consistency of the usage of the word "expression" and more 
importantly will implement "?plotmath" features seemlessly.

Regards
PK




More information about the Rkward-devel mailing list