Learn R Programming

agricolae (version 1.0-4)

design.alpha: Alpha design type (0,1)

Description

Creates alpha designs starting from the alpha design fixing under the 4 series formulated by Patterson and Williams.

Usage

design.alpha(trt, k, r, number = 1, seed = 0, kinds = "Super-Duper")

Arguments

trt
Treatments
k
size block
r
Replications
number
number of first plot
seed
seed
kinds
method for to randomize

Value

  • trtvector, name of the treatments
  • kConstant, numeric
  • rConstant, numeric
  • numberConstant, numeric
  • seedConstant, numeric
  • kindscharacter

Details

Series: I. r=2, k

References

H.D. Patterson and E.R. Williams. Biometrika (1976) A new class of resolvable incomplete block designs. printed in Great Britain. Online: http://biomet.oxfordjournals.org/cgi/content/abstract/63/1/83

See Also

design.bib, lattice.simple

Examples

Run this code
library(agricolae)
#Example one
trt<-1:30
t <- length(trt)
# size block k
k<-3
# Blocks s
s<-t/k
# replications r
r <- 2
book<- design.alpha(trt,k,r)
plots<-book[,1]
dim(plots)<-c(k,s,r)
for (i in 1:r) print(t(plots[,,i]))
trt<-as.numeric(book[,4])
dim(trt)<-c(k,s,r)
for (i in 1:r) print(t(trt[,,i]))

# Example two 
trt<-letters[1:12] 
t <- length(trt)
k<-3
r<-3
s<-t/k
book<- design.alpha(trt,k,r)
plots<-book[,1]
dim(plots)<-c(k,s,r)
for (i in 1:r) print(t(plots[,,i]))
trt<-book[,4]
dim(trt)<-c(k,s,r)
for (i in 1:r) print(t(trt[,,i]))

Run the code above in your browser using DataLab