statgenSTA (version 1.0.2)

report.STA: 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 generatd. 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 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. Trialname, traitname and the type of model (genotype fixed or random) will be concatenated to the name of the outputfile. 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 requiered. Checking for this is done with Sys.which("pdflatex").

See Also

Other STA: STAtoCross(), STAtoTD(), plot.STA(), summary.STA()

Examples

Run this code
# NOT RUN {
## Fit model using lme4.
myModel1 <- fitTD(TD = TDHeat05, design = "ibd", traits = "yield")
## Create a pdf report summarizing the results for the model with genotype
## as fixed factor.
# }
# NOT RUN {
report(myModel1, outfile = tempfile(fileext = ".pdf"), what = "fixed")
# }
# NOT RUN {
## 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.
# }
# NOT RUN {
report(myModel1, outfile = tempfile(fileext = ".pdf"), descending = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab