IniziaInizia gratis

Drawing RCBDs with Agricolae

The agricolae package is very helpful when you want to "draw" out the design of an experiment for yourself using R. It can draw many different kinds of experiments, including a randomized complete block design. Here's an example of one:

     [,1] [,2] [,3] [,4]
[1,] "D"  "C"  "A"  "B" 
[2,] "B"  "A"  "D"  "C" 
[3,] "D"  "A"  "B"  "C" 
[4,] "A"  "B"  "D"  "C"

In this RCBD, we have 4 blocks (each row of the output). Inside of each block, each treatment "A", "B", "C", and "D" is used, because this is a complete design. So if these 4 blocks/rows of the output were four fields of a farmer's, they should give the first field the "D" treatment in the first season, then "C", then "A", then "B".

Let's draw an RCBD design with 5 treatments and 4 blocks, which go in the r argument. The agricolae package has been loaded for you.

Questo esercizio fa parte del corso

Experimental Design in R

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Create designs using ls()
___ <- ls("package:agricolae", pattern = "design")
___
Modifica ed esegui il codice