writehtml              package:pinktoe              R Documentation

_W_r_i_t_e _t_h_e _H_T_M_L _f_i_l_e _f_o_r _a_n _E_D_M _d_e_c_i_s_i_o_n _a_n_d _r_e_t_u_r_n _t_h_e _n_a_m_e_s _o_f _t_h_e _c_a_l_l_e_d _p_e_r_l _f_i_l_e_s _s_o _t_h_a_t _t_h_e_y _c_a_n _b_e _c_o_n_s_t_r_u_c_t_e_d.

_D_e_s_c_r_i_p_t_i_o_n:

     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).

_U_s_a_g_e:

     writehtml(edmlabel, uniqedmlab, edmtextfn, edmtittext, cgibindir, localdir, commonhtml, numvar, numstring, treeobj)

_A_r_g_u_m_e_n_t_s:

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

_D_e_t_a_i_l_s:

     Writes the HTML files

_V_a_l_u_e:

     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.

_N_o_t_e:

     Not intended for general user use

_A_u_t_h_o_r(_s):

     Guy P Nason

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://www.stats.bris.ac.uk/~magpn/Research/Pinktoe/Welcome.html>

_S_e_e _A_l_s_o:

     'pinktoe'

_E_x_a_m_p_l_e_s:

     #
     #Not intended for general user use
     #

