report.mefa | R Documentation |
The data of the 'mefa' object is written into a file in a standard format used by most local journals for publishing distribution data of organisms. The aim is to provide an exporting facility that can directly be used for generating reports, parts of research papers, or supplementary materials.
report(x, ...)
## S3 method for class 'mefa'
report(x, filename, segment = FALSE, n = NULL,
by.taxa = TRUE, samp.var = NULL, drop.redundant = NULL,
collapse = TRUE, taxa.name = NULL, author.name = NULL,
taxa.order = NULL, grouping = FALSE, tex = FALSE, binary = FALSE,
tex.control = list(ital.taxa = TRUE, noindent = TRUE,
bold.sect = TRUE, bold.1st = TRUE, vspace1 = 0.5, vspace2 = 0.2),
sep = c(",", ":", "(", ":", ",", ")", ";"), dir = getwd(), ...)
x |
an object of class 'mefa'. |
filename |
character, the name of the file to be written into the working directory or a directory defined by the |
segment |
logical, if |
n |
segments to be used. If |
by.taxa |
logical, whether the main sectioning should be made according to taxa ( |
samp.var |
variables in the samples table ( |
drop.redundant |
logical, whether redundant elements should be dropped (an integer up to |
collapse |
logical, if |
taxa.name |
column in the taxa table ( |
author.name |
column in the taxa table ( |
taxa.order |
column in the taxa table ( |
grouping |
logical, whether all records of a given species should be collapsed into single paragraph without grouping ( |
tex |
logical, whether to generate formatted LaTeX output ( |
binary |
logical, if |
tex.control |
a list with LaTex formatting options (if |
sep |
character vector of length 7. The 1st separates values in |
dir |
character, full path of the directory where the file should be written (working directory is then restored). If |
... |
further arguments potentially passed (currently there are none). |
The resulting file can be recycled by copy-and-pasting into a document (if tex = FALSE
) or be included into a LaTeX report (e.g. via the package Sweave
, see mefadocs("SampleReport")
). Contrary to the many arguments, the default values do not need much modifications in most of the cases (see examples).
Writes a file into the working (or a specified) directory.
The by.taxa = FALSE
option is not yet implemented.
P\'eter S\'olymos, solymos@ualberta.ca
S\'olymos P. (2008) mefa: an R package for handling and reporting count data. Community Ecology 9, 125–127.
S\'olymos P. (2009) Processing ecological data in R with the mefa package. Journal of Statistical Software 29(8), 1–28. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v029.i08")}
http://mefa.r-forge.r-project.org/
mefa
, write
data(dol.count, dol.samp, dol.taxa)
x <- mefa(stcs(dol.count), dol.samp, dol.taxa)
## Not run:
## Plain text
## Count values from x$xtab
report(x, "report-all.txt")
## Count values for each segments
report(x, "report-segm-all.txt",
samp.var = c("method","microhab"), segment = TRUE)
## LaTeX formatting
report(x, "report-all.tex", tex=TRUE)
## For how to include into a TeX or Rnw file, see:
mefadocs("SampleReport")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.