HTMLInsertGraph            package:R2HTML            R Documentation

_I_n_s_e_r_t _a _g_r_a_p_h _i_n _a _H_T_M_L _r_e_p_o_r_t

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

     Write the HTML <img> tag to an output, so that a existant graph
     could be displayed in the HTML report

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

     HTMLInsertGraph(GraphFileName="", Caption="", GraphBorder=1, Align="center", WidthHTML=500, HeightHTML=NULL, file=.HTML.file, append=TRUE,...)

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

GraphFileName: Name of the target graph (GIF, JPEG or PNG) 

 Caption: If non empty, text to be written under the graph, as it's
          caption

GraphBorder: Size of the border, in pixels 

   Align: Alignment of the graph (center, left or right) 

WidthHTML: Width of the image in HTML

HeightHTML: Height of the image in HTML (NULL for not specified)

    file: Name of the target HTML file (the report) 

  append: logical. If 'TRUE' output will be appended to 'file';
          otherwise, it will overwrite the contents of 'file'

     ...: ... 

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

     The steps to add a graph to a HTML file are the following: first
     create the graph, by using a device convenient for web pages, such
     as GIF, JPEG or PNG. Ensure to write it in the same directory than
     the HTML file. Then call HTMLInsertGraph.

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

     no value returned.

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

     Eric Lecoutre

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

     'HTMLplot'

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

             directory=getwd()
             HTMLoutput=file.path(directory,"output.html")
             graph1="graph1.png"
             # Write graph to a file
             ## Not run: png(file.path(directory,graph1))
             ## Not run: plot(table(rpois(100,5)), type = "h", col = "red", lwd=10,main="rpois(100,lambda=5)")
             ## Not run: dev.off()
             # Insert graph to the HTML output
             HTMLInsertGraph(graph1,file=HTMLoutput,caption="Sample discrete distribution plot")

