design_experiment provides experimental design for the different situations corresponding to the choosen family of analysis

design_experiment(expe.type, location = "location", year = "2016",
  germplasm, controls, nb.controls.per.block, nb.blocks, nb.cols,
  return.format = "standard", allow_XXXX = TRUE)

Arguments

expe.type

The type of experiment to settle "satellite-farm", "regional-farm", "row-column", "fully-repicated", "IBD". See details for more information.

location

Name of the location.

year

Year of the experiment.

germplasm

Vector with the names of the germplasm.

controls

Vector with names of controls.

nb.controls.per.block

Number of controls per blocks.

nb.blocks

Number of blocks. For expe.type = "IBD", it corresponds to the number of locations.

nb.cols

Number of columns in the design. The number of rows is computed automaticaly.

return.format

"standard" or "shinemas". See details for more information.

allow_XXXX

TRUE or FALSE. Allow to have XXXX placed in stead of germplasm in order to fill the design.

Value

The function returns a list with

  • data.frame : A data frame according to return.format

  • design : An image of the experimental design

Details

regarding return.format :

  • "standard" return a data frame with the following columns : "location", "year", "germplasm", "block", "X" and "Y".

  • "shinemas" for SHiNeMaS reproduction template file. It returns a data frame with the following columns :"project", "sown_year", "harvested_year", "id_seed_lot_sown", "intra_selection_name", "etiquette", "split", "quantity_sown", "quantity_harvested", "block", "X" and "Y".

Note that an efficient R package to design experiment is DiGGer, see http://www.austatgen.org/software/ for mor details. Unfortunately, the lience of the package did not allow us to fork the code.

In this function, the code is based on the following algorithms:

  • "satellite-farm"

    1. randomize the germplasm

    2. get the data frame with one block, two columns and one control in each column

    3. randomize the columns

  • "regional-farm"

    1. randomize the germplasm

    2. get the data frame with blocks, columns and controls in each block

    3. arrange at least one control per row

    4. for each row, put control in different column

    5. randomize rows and columns

    6. check that controls do not touch each other

    7. check number of controls in col and row and send a warning message if control are missing in rows or columns

  • "row-column" Note that expe.type = "row-column" is particular case of expe.type = "regional-farm" where the number of controls must be at least the number of columns or rows.

    1. randomize the germplasm

    2. get the data frame with blocks, columns and controls in each block

    3. arrange at least one control per row

    4. for each row, put control in different column

    5. randomize rows and columns

    6. check that controls do not touch each other

    7. check number of controls in col and row and send a stop message if control are missing in rows or columns

  • "fully-repicated"

    1. randomize the germplasm

    2. get the data frame with blocks, columns and germplasm in each block

    3. arrange randomization so that no germplasm can be in the same column between blocks

  • "IBD" the randomization is based on the ibd function in the ibd package. See ?ibd for more information

See exampels in the book : here.