Description Usage Arguments Value Note Author(s) See Also Examples
Generates LaTeX table from data retrieved from an Excel or Access file. The table is closed immediately after retrieval.
1 2 3 4 |
object |
path of Excel or Access file. Currently, no other ODBC source are supported, but changing this should be easy. |
title |
to be printed in upper left corner |
table |
name of table or query in database, or named range in Excel. In theory, giving worksheet names for Excel should work, but results are mixed, so better always use named ranges. Not used if sql is given. |
caption |
optional caption. Default is Table <tablename>, n=<number of rows> |
longtable |
use longtable; cannot be combinded with |
ctable |
Uses |
label |
optional label. Default is tab:tablename |
file |
output file name; default prints output to the standard output, which is the choice for Sweave. |
sql |
SQL query to retrieve data. Default is whole table. Parameter
|
where |
positioning parameter for LaTeX |
mincapwidth |
for ctable, the minimum caption width in mm. Requires ctable1.sty or a more recent update of ctable. |
width |
for ctable, width of table. Should be given when column type
|
as.is |
passed to sqlQuery; if true, string are not converted to factors. |
... |
Additional parameters passed to |
Returns the table retrieved from the database. This is somewhat
inconsistent to latex.lme
and friends that return the latex object,
but it's convenient if single items of the table are to be displayed in
Sweave.
Requires ctable
in your Snw/tex file if ctable = TRUE
Dieter Menne, dieter.menne@menne-biomed.de
lme.value
, latex
,
latex.lme
, lme
1 2 3 4 5 6 7 8 | ## Not run:
# tex output in Sweave
database = system.file("extdata", "testtable.accdb", package = "Dlatex")
tb <- latexODBCTable(database, table = "Subject")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.