Learn R Programming

agricolae (version 1.3-7)

design.mat: Experimental design matrix

Description

Generate the design matrix from the fieldbook generated by an experimental plan or a dataframe for analysis.

Usage

design.mat(book, locations)

Value

X is matrix design.

Arguments

book

data frame or matrix, field book

locations

numeric, column position of the field book

Author

Felipe de Mendiburu

See Also

design.ab, design.alpha,design.bib, design.crd , design.cyclic , design.split , design.graeco, design.lattice, design.lsd, design.rcbd, design.strip, design.dau

Examples

Run this code
# dataframe: data analysis
library(agricolae)
data(sweetpotato)
X<-design.mat(sweetpotato,1)
print(X)
# fieldbook: RCBD design
trt <- LETTERS[1:4]
r<-3
plan<-design.rcbd(trt,r,seed=11)
X<-design.mat(plan$book,2:3)
print(X)

Run the code above in your browser using DataLab