Learn R Programming

AgroR (version 1.3.6)

sketch: Utils: Experimental sketch

Description

Experimental sketching function

Usage

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
)

Value

Returns an experimental sketch according to the specified design.

Arguments

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

Author

Gabriel Danilo Shimizu, shimizu@uel.br

Leandro Simoes Azeredo Goncalves

Rodrigo Yudi Palhaci Marubayashi

References

Mendiburu, F., & de Mendiburu, M. F. (2019). Package ‘agricolae’. R Package, Version, 1-2.

Examples

Run this code
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")

Run the code above in your browser using DataLab