writeperl {pinktoe} | R Documentation |
A perl file needs to be written that works out whether a tick box has been checked and then calls either code to deal with a leaf or an HTML file for another decision to be made.
writeperl(childleftrow, childrightrow, treeobj, perlname, edmlabel, htmldir, edmix, stateprintfn, requirelib)
childleftrow |
The "left" hand row number possibility stemming from this node. |
childrightrow |
The "right" hand row number possibility stemming from this node. |
treeobj |
The rpart or tree object that this whole process is using |
perlname |
The name of the perl file to construct (returned earlier from writehtml |
edmlabel |
The variable name (from the var field of the original tree) for this HTML file/question. |
htmldir |
A character string containing the directory where the HTML
files generated by pinktoe (with the extension .htm )
will be stored. (This should be a pathname understood and
able to be found by perl). |
edmix |
A vector of the node numbers (row names of the $frame component of the tree) |
stateprintfn |
A user-supplied function that decides what to do when
supplied with the yval reached at the leaf of a tree. Some
text can be output, or maybe a perl function call. |
requirelib |
A library of perl functions that can be called by, e.g.
stateprintfn . The library that this refers to
should reside in the cgibin directory. If no function calls
are planned then it doesn't matter what argument is supplied. |
The HTML file that preceeds the construction of the currently described perl file
describes a decision with two possible courses of action. These are coded in the childleftrow
and childrightrow
arguments. Perl code is written to work out whether the checkbox in the
HTML code was ticked or note and then execute the relevant next HTML file or leaf code.
No value returned.
Not intended for general user use
Guy P Nason
http://www.stats.bris.ac.uk/~magpn/Research/Pinktoe/Welcome.html
# #Not intended for general user use #