Skip to contents

report.augmentedRCBD.bulk generates a tidy report from an object of class augmentedRCBD.bulk as docx MS word file using the officer package or xlsx MS excel file using the openxlsx package.

Usage

# S3 method for class 'augmentedRCBD.bulk'
report(aug, target, file.type = c("excel"), ...)

Arguments

aug

An object of class augmentedRCBD.bulk.

target

The path to the docx file to be created.

file.type

The file type of the report. From v0.2.0, only "excel" (MS Excel report) is supported. Generation of MS Word reports is no longer supported.

...

Unused

Note

The raw values in the augmentedRCBD object are retained with full precision. They are only formatted to display 2 decimal places in the Excel report.

If values such as adjusted means are required for downstream analysis, export the raw values directly from R or use the Excel report, which preserves the underlying values.

The default number of displayed decimal places can be changed using the augmentedRCBD.round.digits global option. For example, setOption(augmentedRCBD.round.digits = 3) sets the number of decimal places to 3.

Values are not rounded to zero; instead, they are rounded to the nearest decimal place specified by augmentedRCBD.round.digits. F value, t ratio and p values are not rounded to less than 3 decimal places.

Examples

# Example data
blk <- c(rep(1,7),rep(2,6),rep(3,7))
trt <- c(1, 2, 3, 4, 7, 11, 12, 1, 2, 3, 4, 5, 9, 1, 2, 3, 4, 8, 6, 10)

y1 <- c(92, 79, 87, 81, 96, 89, 82, 79, 81, 81, 91, 79, 78, 83, 77, 78, 78,
        70, 75, 74)
y2 <- c(258, 224, 238, 278, 347, 300, 289, 260, 220, 237, 227, 281, 311, 250,
        240, 268, 287, 226, 395, 450)
dataf <- data.frame(blk, trt, y1, y2)

bout <- augmentedRCBD.bulk(data = dataf, block = "blk",
                           treatment = "trt", traits = c("y1", "y2"),
                           checks = NULL, alpha = 0.05, describe = TRUE,
                           freqdist = TRUE, gva = TRUE,
                           check.col = c("brown", "darkcyan",
                                         "forestgreen", "purple"),
                           console = FALSE)
#> 
#> ANOVA for y1 computed (1/2)
#> 
#> ANOVA for y2 computed (2/2)

# \donttest{
report(aug = bout,
       target = file.path(tempdir(),
                          "augmentedRCBD bulk output.xlsx"),
       file.type = "excel")
#> Error in insertImage(wb = wb, sheet = sheet, file = fileName, width = width,     height = height, startRow = startRow, startCol = startCol,     units = units, dpi = dpi): File does not exist.
# }