3 ### Produce LaTeX and HTML tables from R objects.
\r
5 ### Copyright 2000-2012 David B. Dahl <dahl@stat.tamu.edu>
\r
7 ### Maintained by Charles Roosen <croosen@mango-solutions.com>
\r
9 ### This file is part of the `xtable' library for R and related languages.
\r
10 ### It is made available under the terms of the GNU General Public
\r
11 ### License, version 2, or at your option, any later version,
\r
12 ### incorporated herein by reference.
\r
14 ### This program is distributed in the hope that it will be
\r
15 ### useful, but WITHOUT ANY WARRANTY; without even the implied
\r
16 ### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
\r
17 ### PURPOSE. See the GNU General Public License for more
\r
20 ### You should have received a copy of the GNU General Public
\r
21 ### License along with this program; if not, write to the Free
\r
22 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
\r
23 ### MA 02111-1307, USA
\r
25 ## The generic for toLatex() is declared in the base package "utils"
\r
27 toLatex.xtable <- function(object, ...){
\r
28 # Initially just capturing the output of print.xtable(). At some
\r
29 # point this could be refactored to have print.xtable() call
\r
30 # toLatex() instead. - CR, 30/01/2012
\r
31 dotArgs <- list(...)
\r
33 dotArgs$type <- "latex"
\r
34 dotArgs$print.results <- FALSE
\r
35 z <- do.call("print.xtable", dotArgs)
\r
37 z <- strsplit(z, split="\n")[[1]]
\r