report.STA: Report method for class STA

View source: R/createSTA.R

report.STAR Documentation

Report method for class STA

Description

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.

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").

Value

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

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.

report(modLme,
       outfile = tempfile(fileext = ".pdf"),
       what = "fixed")


## 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.

report(modLme,
       outfile = tempfile(fileext = ".pdf"),
       descending = FALSE)



statgenSTA documentation built on Oct. 14, 2024, 9:10 a.m.