| da_export | R Documentation |
da_export() writes the main tables of a result of this package (the analysis of variance, the components,
the effects with their standard errors and tests, and so on) to a Word document, a LaTeX file of booktabs
tables, an HTML page, a Markdown file or CSV files, with numbers rounded for print.
da_export(
x,
file,
format = c("docx", "latex", "html", "markdown", "csv"),
tables = NULL,
digits = 3,
title = NULL
)
da_tables(x, digits = 3)
x |
a result of |
file |
path of the file to write (its extension does not choose the format; |
format |
|
tables |
names of the tables to write (default all; see |
digits |
decimals of the printed numbers (default 3). |
title |
title written above the tables (default: the label of the analysis). |
da_tables() returns the tables that da_export() writes, as a named list of data frames, so that they
can be edited first. Numbers are rounded to digits decimals; p-values are printed with three decimals and as
<0.001 below 0.001. Word documents need the packages officer and flextable; the other formats
need nothing beyond base R. For LaTeX, the file holds one table environment per table and needs
\usepackage{booktabs} in the preamble. For CSV, each table goes to its own file, named after file
with the table name appended.
da_export(): the path(s) of the file(s) written, invisibly. da_tables(): a named list of data
frames.
Muhammad Yaseen (myaseen208@gmail.com)
Other DiallelAnalysisR utilities:
da_notation(),
da_reference(),
da_save(),
da_theme()
fit <-
Griffing(
y = Yield
, Rep = Rep
, Cross1 = Cross1
, Cross2 = Cross2
, data = GriffingData1
, Method = 1
, Model = 1
, Reciprocal = c("combined", "split")[1]
)
names(da_tables(x = fit, digits = 3))
f <- tempfile(fileext = ".tex")
da_export(
x = fit
, file = f
, format = c("docx", "latex", "html", "markdown", "csv")[2]
, tables = NULL
, digits = 3
, title = NULL
)
cat(readLines(f)[1:12], sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.