View source: R/croqui_function.R
sketch | R Documentation |
Experimental sketching function
sketch(
trat,
trat1 = NULL,
trat2 = NULL,
r,
design = "DIC",
pos = "line",
color.sep = "all",
ID = FALSE,
print.ID = TRUE,
add.streets.y = NA,
add.streets.x = NA,
label.x = "",
label.y = "",
axissize = 12,
legendsize = 12,
labelsize = 4,
export.csv = FALSE,
comment.caption = NULL
)
trat |
Vector with factor A levels |
trat1 |
Vector with levels of factor B (Set to NULL if not factorial or psub) |
trat2 |
Vector with levels of factor C (Set to NULL if not factorial) |
r |
Number of repetitions |
design |
Experimental design (see note) |
pos |
Repeat position (line or column), |
color.sep |
Color box |
ID |
plot Add only identification in sketch |
print.ID |
Print table ID |
add.streets.y |
Adds streets by separating treatments in row or column. The user must supply a numeric vector grouping the rows or columns that must be together. See the example. |
add.streets.x |
Adds streets by separating treatments in row or column. The user must supply a numeric vector grouping the rows or columns that must be together. See the example. |
label.x |
text in x |
label.y |
text in y |
axissize |
Axis size |
legendsize |
Title legend size |
labelsize |
Label size |
export.csv |
Save table template based on sketch in csv |
comment.caption |
Add comment in caption |
Returns an experimental sketch according to the specified design.
The sketches have only a rectangular shape, and the blocks (in the case of randomized blocks) can be in line or in a column.
For the design argument, you can choose from the following options:
design="DIC"
Completely randomized design
design="DBC"
Randomized block design
design="DQL"
Latin square design
design="FAT2DIC"
DIC experiments in double factorial
design="FAT2DBC"
DBC experiments in double factorial
design="FAT3DIC"
DIC experiments in triple factorial
design="FAT3DBC"
DBC experiments in triple factorial
design="PSUBDIC"
DIC experiments in split-plot
design="PSUBDBC"
DBC experiments in split-plot
design="PSUBSUBDBC"
DBC experiments in split-split-plot
design="STRIP-PLOT"
Strip-plot DBC experiments
For the color.sep argument, you can choose from the following options:
design="DIC"
use "all" or "none"
design="DBC"
use "all","bloco" or "none"
design="DQL"
use "all", "column", "line" or "none"
design="FAT2DIC"
use "all", "f1", "f2" or "none"
design="FAT2DBC"
use "all", "f1", "f2", "block" or "none"
design="FAT3DIC"
use "all", "f1", "f2", "f3" or "none"
design="FAT3DBC"
use "all", "f1", "f2", "f3", "block" or "none"
design="PSUBDIC"
use "all", "f1", "f2" or "none"
design="PSUBDBC"
use "all", "f1", "f2", "block" or "none"
design="PSUBSUBDBC"
use "all", "f1", "f2", "f3", "block" or "none"
Gabriel Danilo Shimizu, shimizu@uel.br
Leandro Simoes Azeredo Goncalves
Rodrigo Yudi Palhaci Marubayashi
Mendiburu, F., & de Mendiburu, M. F. (2019). Package ‘agricolae’. R Package, Version, 1-2.
Trat=paste("Tr",1:6)
#=============================
# Completely randomized design
#=============================
sketch(Trat,r=3)
sketch(Trat,r=3,pos="column")
sketch(Trat,r=3,color.sep="none")
sketch(Trat,r=3,color.sep="none",ID=TRUE,print.ID=TRUE)
sketch(Trat,r=3,pos="column",add.streets.x=c(1,1,2,2,3,3))
#=============================
# Randomized block design
#=============================
sketch(Trat, r=3, design="DBC")
sketch(Trat, r=3, design="DBC",pos="column")
sketch(Trat, r=3, design="DBC",pos="column",add.streets.x=c(1,1,2))
sketch(Trat, r=3, design="DBC",pos="column",add.streets.x=c(1,2,3), add.streets.y=1:6)
sketch(Trat, r=3, design="DBC",pos="line",add.streets.y=c(1,2,3), add.streets.x=1:6)
#=============================
# Completely randomized experiments in double factorial
#=============================
sketch(trat=c("A","B"),
trat1=c("A","B","C"),
design = "FAT2DIC",
r=3)
sketch(trat=c("A","B"),
trat1=c("A","B","C"),
design = "FAT2DIC",
r=3,
pos="column")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.