writehtml {pinktoe} | R Documentation |
Part of the pinktoe suite this function writes the HTML files that a web server will serve. The content of these HTML files will be some explanatory text (generated by edmtextfn, edmtittext), with a check box that will record the answer to the question specified in the HTML file. These HTML files will be able to call perl files and their names are constructed by this function and returned (and later used by writeperl).
writehtml(edmlabel, uniqedmlab, edmtextfn, edmtittext, cgibindir, localdir, commonhtml, numvar, numstring, treeobj)
edmlabel |
The variable name (from the var field of the original tree) for this HTML file/question. |
uniqedmlab |
HTML file is associated with a node which is a given split on a variable: a unique filename for each node should be supplied (genedmhtml generates this by combining the variable name with the node number). |
edmtextfn |
A function that can print out explanatory text given a variable name (see web help page and \end{displaymath}.text example. |
edmtittext |
Prints out a title string given a variable name |
cgibindir |
A character string containing the directory where the perl
files generated by pinktoe (with the extension .pl ) will be
stored.
(This should be the directory part of the URL of the cgi-bin
directory). |
localdir |
A local location to store both the HTML and perl files immediately after they are generated |
commonhtml |
A user-supplied function that prints out some HTML code. This is appended to every HTML web page. |
numvar |
Logical variable which is TRUE is the variable for this HTML is numeric, FALSE if it is a factor. |
numstring |
The S character string which describes the split (either factor or numeric) for this variable. Basically one of the cells in the dataframe returned by splits.rpart |
treeobj |
The rpart (or tree) object that this whole process is concerned with |
Writes the HTML files
The HTML file here creates a checkbox. The result of which causes a call to a perl function. The HTML file here creates the perl file name
and passes it back to its calling function (genedmhtml
) which then creates the perl function and supplies it with the file name.
This function returns the perl filename.
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 #