print.xtable package:xtable R Documentation _P_r_i_n_t _E_x_p_o_r_t _T_a_b_l_e_s _D_e_s_c_r_i_p_t_i_o_n: Function returning and displaying or writing to disk the LaTeX or HTML code associated with the supplied object of class 'xtable'. _U_s_a_g_e: ## S3 method for class 'xtable': print(x, type="latex", file="", append=FALSE, floating=TRUE, floating.environment="table", table.placement = "ht", caption.placement="bottom", latex.environments=c("center"),tabular.environment = "tabular", size=NULL,hline.after=c(-1,0,nrow(x)), NA.string = "", include.rownames=TRUE,include.colnames=TRUE,only.contents=FALSE,add.to.row=NULL, sanitize.text.function=NULL,...) _A_r_g_u_m_e_n_t_s: x: An object of class '"xtable"'. type: Type of table to produce. Possible values for 'type' are '"latex"' or '"html"'. Default value is '"latex"'. file: Name of file where the resulting code should be saved. If 'file==""', output is displayed on screen. Note that the function also (invisibly) returns a character vector of the results (which can be helpful for post-processing). Default value is '""'. append: If 'TRUE' and 'file!=""', code will be appended to 'file' instead of overwriting 'file'. Default value is 'FALSE'. floating: If 'TRUE' and 'type="latex"', the resulting table will be a floating table (using, for example, '\begin{table}' and '\end{table}'). See 'floating.environment' below. Default value is 'TRUE'. floating.environment: If 'floating=TRUE' and 'type="latex"', the resulting table uses the specified floating environment. Possible values are '"table"' or '"sidewaystable"' (defined in the LaTeX package 'rotating'). Default value is '"table"'. table.placement: If 'floating=TRUE' and 'type="latex"', the floating table will have placement given by 'table.placement' where 'table.placement' must be 'NULL' or contain only elements of {"h","t","b","p","!","H"}. Default value is '"ht"'. caption.placement: The caption will be have placed at the bottom of the table if 'caption.placement' is '"bottom"' and at the top of the table if it equals '"top"'. Default value is '"bottom"'. latex.environments: If 'floating=TRUE' and 'type="latex"', the specificed latex environments (provided as a character vector) will enclose the tabuluar environment. Default value is '"center"'. tabular.environment: When 'type="latex"', the tabular environment that will be used. Defaults to '"tabular"'. When working with tables that extend more than one page, using 'tabular.environment="longtable"' and the LaTeX package '"longtable"' (see Fairbairns, 2005) allows one to typeset them uniformly. Note that '"floating"' should be set to '"FALSE"' when using the '"longtable"' environment. size: An arbitrary character vector intended to be used to set the font size in a LaTeX table. The supplied value (if not 'NULL') is inserted just before the tabular environment starts. Default value is 'NULL'. hline.after: When 'type="latex"', a vector of numbers between -1 and '"nrow(x)"', inclusive, indicating the rows after which a horizontal line should appear. If 'NULL' is used no lines are produced. Default value is 'c(-1,0,nrow(x))' which means draw a line before and after the columns names and at the end of the table. Repeated values are allowed. NA.string: String to be used for missing values in table enteries. Default value is '""'. include.rownames: logical. If 'TRUE' the rows names is printed. Default value is 'TRUE'. include.colnames: logical. If 'TRUE' the columns names is printed. Default value is 'TRUE'. only.contents: logical. If 'TRUE' only the rows of the table is printed. Default value is 'FALSE'. add.to.row: a list of two components. The first component (which should be called 'pos') is a list contains the position of rows on which extra commands should be added at the end, The second component (which should be called 'command') is a character vector of the same length of the first component which contains the command that should be added at the end of the specified rows. Default value is 'NULL', i.e. do not add commands. sanitize.text.function: All non-numeric columns, together with column and row names, are sanitised in an attempt to remove characters which have special meaning for the output format. If 'sanitize.text.function' is not NULL (the default), it should be a function taking a character vector and returning one, and will be used for the sanitization instead of the default internal function. ...: Additional arguments. (Currently ignored.) _D_e_t_a_i_l_s: This function displays or writes to disk the code to produce a table associated with an object 'x' of class '"xtable"'. The resulting code is either a LaTeX or HTML table, depending on the value of 'type'. The function also (invisibly) returns a character vector of the results (which can be helpful for post-processing). Since version 1.4 the non default behavior of 'hline.after' is changed. To obtain the same results as the previous versions add to the 'hline.after' vector the vector 'c(-1, 0, nrow(x))' where 'nrow(x)' is the numbers of rows of the object. From version 1.4-3, all non-numeric columns are sanitized, and all LaTeX special characters are sanitised for LaTeX output. See Section 3 of the 'xtableGallery' vignette for an example of customising the sanitization. From version 1.4-4, the sanitization also applies to column names. To remove any text sanitization, specify 'sanitize.text.function=function(x){x}'. _A_u_t_h_o_r(_s): David Dahl dahl@stat.tamu.edu with contributions and suggestions from many others (see source code). _R_e_f_e_r_e_n_c_e_s: Fairbairns, Robin (2005) _Tables longer than a single page_ The UK List of TeX Frequently Asked Questions on the Web. _S_e_e _A_l_s_o: 'xtable', 'caption', 'label', 'align', 'digits', 'display', 'formatC'