html                  package:Hmisc                  R Documentation

_C_o_n_v_e_r_t _a_n _S _o_b_j_e_c_t _t_o _H_T_M_L

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

     'html' is a generic function, for which only two methods are
     currently implemented, 'html.latex' and a rudimentary
     'html.data.frame'.  The former uses the 'HeVeA' LaTeX to HTML 
     translator by Maranget to create an HTML file from a LaTeX file
     like the one produced by 'latex'.  The resulting HTML file may be
     displayed using a 'show' or a 'print' method.  The browser
     specified in 'options(browser=)' for R ('help.browser' for S-Plus)
     is launched to display the HTML file.   'html.default' just runs
     'html.data.frame'.

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

     html(object, ...)
     ## S3 method for class 'latex':
     html(object, ...)
     ## S3 method for class 'data.frame':
     html(object,
       file=paste(first.word(deparse(substitute(object))),'html',sep='.'),
          append=FALSE, link=NULL, linkCol=1, linkType=c('href','name'), ...)
     ## Default S3 method:
     html(object,
          file=paste(first.word(deparse(substitute(object))),'html',sep='.'),
          append=FALSE, link=NULL, linkCol=1, linkType=c('href','name'), ...)
     ## S3 method for class 'html':
     print(x, ...)
     ## S3 method for class 'html':
     show(object)

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

  object: a data frame or an object created by 'latex'.  For 'show' is
          an object created by 'html'.  For the generic 'html' is any
          object for which an 'html' method exists.

    file: name of the file to create.  The default file name is
          'object.html' where 'object' is the first word in the name of
          the argument for 'object'. 

  append: set to 'TRUE' to append to an existing file

    link: character vector specifying hyperlink names to attach to
          selected elements of the matrix or data frame.  No hyperlinks
          are used if 'link' is omitted or for elements of 'link' that
          are '""'.

 linkCol: column number of 'object' to which hyperlinks are attached. 
          Defaults to first column.

linkType: defaults to '"href"'

     ...: arguments passed to 'format.df'

       x: an object created by 'html'

_S_i_d_e _E_f_f_e_c_t_s:

     'print' or 'show' launch a browser

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

     Frank E. Harrell, Jr. 
      Department of Biostatistics, 
      Vanderbilt University, 
      f.harrell@vanderbilt.edu

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

     Maranget, Luc.  HeVeA: a LaTeX to HTML translater. URL:
     http://para.inria.fr/~maranget/hevea/

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

     'latex'

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

     ## Not run: 
     x <- matrix(1:6, nrow=2, dimnames=list(c('a','b'),c('c','d','e')))
     w <- latex(x)
     h <- html(w) # run HeVeA to convert .tex to .html
     h <- html(x) # convert x directly to html
     options(browser='konqueror')  # use help.browser for S-Plus
     h            # launch html browser by running print.html
     w <- html(x, link=c('','B'))   # hyperlink first row first col to B
     ## End(Not run)

