Skip to contents

pdf reports will be created containing a summary of the results of the fitted model(s). For all selected trails and traits a separate pdf file will be generated. Also a .tex file and a folder containing figures will be created for each report to enable easy modifying of the report.

Usage

# S3 method for class 'STA'
report(
  x,
  ...,
  trials = NULL,
  traits = NULL,
  descending = TRUE,
  outfile = NULL,
  what = c("fixed", "random")
)

Arguments

x

An object of class STA.

...

Further arguments passed to the report function.

trials

A character vector indicating the trials to report. If trials = NULL, all trials are reported.

traits

A character vector indicating the traits to report. If traits = NULL, all traits are reported.

descending

Should the trait be ordered in descending order? Set to FALSE if low values of the trait indicate better performance.

outfile

A character string, the name and location of the output .pdf and .tex file for the report. If NULL, a report with a default name will be created in the current working directory. Trial, trait and the type of model (genotype fixed or random) will be concatenated to the name of the output file.
Both knitr and pdflatex don't work well with spaces in file paths and these are therefore disallowed. Relative paths are possible though.

what

A character vector indicating whether the fitted model with genotype as fixed or genotype as random factor should be reported. By default all fitted models in the STA object are reported.

Value

A pdf report and the .tex file and figures folder that can be used to recreate the report.

Details

This function uses pdflatex to create a pdf report. For it to run correctly an installation of LaTeX is required. Checking for this is done with Sys.which("pdflatex").

See also

Other functions for STA objects: STAtoCross(), STAtoTD(), plot.STA(), summary.STA()

Examples

## Fit model using lme4.
modLme <- fitTD(TD = TDHeat05,
                design = "ibd",
                traits = "yield",
                engine = "lme4")

## Create a pdf report summarizing the results for the model with genotype
## as fixed factor.
# \donttest{
report(modLme,
       outfile = tempfile(fileext = ".pdf"),
       what = "fixed")
#> Error in report.STA(modLme, outfile = tempfile(fileext = ".pdf"), what = "fixed"): An installation of LaTeX is required to create a pdf report.
# }

## Create two pdf report summarizing the results for the model with genotype
## as fixed factor and for the model with genotype as random factor. Order
## the results in ascending order.
# \donttest{
report(modLme,
       outfile = tempfile(fileext = ".pdf"),
       descending = FALSE)
#> Error in report.STA(modLme, outfile = tempfile(fileext = ".pdf"), descending = FALSE): An installation of LaTeX is required to create a pdf report.
# }