designBlocksGGPlot | R Documentation |
designGGPlot
.This function adds block boundaries to a plot produced by designGGPlot
.
It allows control of the starting unit, through originrow and origincolumn,
and the number of rows (nrows) and columns (ncolumns) from the starting unit
that the blocks to be plotted are to cover.
designBlocksGGPlot(ggplot.obj, blockdefinition = NULL, blocksequence = FALSE,
originrow= 0, origincolumn = 0, nrows, ncolumns,
blocklinecolour = "blue", blocklinesize = 2,
facetstrips.placement = "inside",
printPlot = TRUE)
ggplot.obj |
An object produced by |
blockdefinition |
A
Similarly, a single value for a column specifies a repetition of blocks of that size across the columns of the design, while several column values specifies a sequence of blocks across the columns of the size specified. |
blocksequence |
A |
originrow |
A |
origincolumn |
A |
nrows |
A |
ncolumns |
A |
blocklinecolour |
A See |
blocklinesize |
A |
facetstrips.placement |
A |
printPlot |
A |
An object of class "ggplot
", formed by adding to the input ggplot.obj
and
which can be plotted using print
.
Chris Brien
Brien, C.J., Harch, B.D., Correll, R.L., and Bailey, R.A. (2011) Multiphase experiments with at least one later laboratory phase. I. Orthogonal designs. Journal of Agricultural, Biological, and Environmental Statistics, 16:422-450.
designGGPlot
, par
, DiGGer
## Construct a randomized layout for the split-unit design described by
## Brien et al. (2011, Section 5)
split.sys <- cbind(fac.gen(list(Months = 4, Athletes = 3, Tests = 3)),
fac.gen(list(Intensities = LETTERS[1:3], Surfaces = 3),
times = 4))
split.lay <- designRandomize(allocated = split.sys[c("Intensities", "Surfaces")],
recipient = split.sys[c("Months", "Athletes", "Tests")],
nested.recipients = list(Athletes = "Months",
Tests = c("Months", "Athletes")),
seed = 2598)
## Plot the design
cell.colours <- c("lightblue","lightcoral","lightgoldenrod","lightgreen","lightgrey",
"lightpink","lightsalmon","lightcyan","lightyellow","lightseagreen")
split.lay <- within(split.lay,
Treatments <- fac.combine(list(Intensities, Surfaces),
combine.levels = TRUE))
plt <- designGGPlot(split.lay, labels = "Treatments",
row.factors = "Tests", column.factors = c("Months", "Athletes"),
colour.values = cell.colours[1:9], label.size = 6,
blockdefinition = rbind(c(3,1)), blocklinecolour = "darkgreen",
printPlot = FALSE)
#Add Month boundaries
designBlocksGGPlot(plt, nrows = 3, ncolumns = 3, blockdefinition = rbind(c(3,3)))
#### A layout for a growth cabinet experiment that allows for edge effects
data(Cabinet1.des)
plt <- designGGPlot(Cabinet1.des, labels = "Combinations", cellalpha = 0.75,
title = "Lines and Harvests allocation for Cabinet 1",
printPlot = FALSE)
## Plot Mainplot boundaries
plt <- designBlocksGGPlot(plt, blockdefinition = cbind(4,16), originrow= 1 ,
blocklinecolour = "green", nrows = 9, ncolumns = 16,
printPlot = FALSE)
plt <- designBlocksGGPlot(plt, blockdefinition = cbind(1,4),
blocklinecolour = "green", nrows = 1, ncolumns = 16,
printPlot = FALSE)
plt <- designBlocksGGPlot(plt, blockdefinition = cbind(1,4), originrow= 9,
blocklinecolour = "green", nrows = 10, ncolumns = 16,
printPlot = FALSE)
## Plot all 4 block boundaries
plt <- designBlocksGGPlot(plt, blockdefinition = cbind(8,5,5,4), blocksequence = TRUE,
origincolumn = 1, originrow= 1,
blocklinecolour = "blue", nrows = 9, ncolumns = 15,
printPlot = FALSE)
plt <- designBlocksGGPlot(plt, blockdefinition = cbind(10,16),
blocklinecolour = "blue", nrows = 10, ncolumns = 16,
printPlot = FALSE)
## Plot border and internal block boundaries only
plt <- designBlocksGGPlot(plt, blockdefinition = cbind(8,14), origincolumn = 1, originrow= 1,
blocklinecolour = "blue", nrows = 9, ncolumns = 15,
printPlot = FALSE)
plt <- designBlocksGGPlot(plt, blockdefinition = cbind(10,16),
blocklinecolour = "blue", nrows = 10, ncolumns = 16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.