knitr::opts_chunk$set( collapse = TRUE, comment = NA, warning = FALSE, message = FALSE )
This vignette shows how to generate single and multiple unreplicated diagonal arrangement designs using both the FielDHub Shiny App and the scripting function diagonal_arrangement()
from the FielDHub
R package.
In some experiments, there is insufficient seed quantity or field space to conduct trials with large numbers of genotypes, so plant breeders must use unreplicated or partially replicated experimental designs, like unreplicated designs with checks allocated in a systematic diagonal distribution[@estefanova2011]. In some cases, the experiment is split into blocks of specified size. This allows breeders to design a field that contains multiple different experiments, for example, plants at various stages of maturity.
FielDHub includes a function to run such experimental designs, as well as tabs for single and multiple diagonal arrangement on the FielDHub app.
Suppose a plant breeding project needs to identify superior entries of barley. In this project, a preliminary yield trial (PYT) is carried out with 300 genotypes tested in one experiment and over one location by an unreplicated design. The experiment is lying in a field containing 15 rows and 22 columns of plots. In addition, 5 checks are included in a systematic diagonal arrangement across the field to fill 30 plots representing 9.1% of the total number of experimental plots.
To launch the app you need to run either
FielDHub::run_app()
or
library(FielDHub) run_app()
Once the app is running, go to Unreplicated Designs > Single Diagonal Arrangement
Then, follow the following steps where we will show how to generate a single unreplicated diagonal arrangement design.
Import entries' list? Choose whether to import a list with entry numbers and names for genotypes or treatments.
If the selection is No
, that means the app is going to generate synthetic data for entries and names of the treatment/genotypes based on the user inputs.
If the selection is Yes
, the entries list must fulfill a specific format and must be a .csv
file. The file must have the columns ENTRY
and NAME
. The ENTRY
column must have a unique integer number entry for each treatment/genotype. The column NAME
must have a unique name that identifies each treatment/genotype. Both ENTRY and NAME must be unique, duplicates are not allowed. In the following table, we show an example of the entries list format. This example has an entry list with 4 checks and 8 treatments/genotypes. It is crucial to allocate the checks in the top part of the file.
ENTRY <- 1:12 NAME <- c(c("CH1","CH2","CH3","CH4"), paste0("ND-", 5:12)) df <- data.frame(ENTRY,NAME)
library(knitr) kable(df)
Enter the number of entries/treatments in the Input # of Entries box, which is 300 in our case.
Select 5 from the drop-down on the Input # of Checks box.
Since we want to run this experiment over 1 location, set Input # of Locations to 1.
Select serpentine
or cartesian
in the Plot Order Layout. For this example we will use the serpentine
layout.
To ensure that randomizations are consistent across sessions, we can set a random seed in the box labeled random seed. For instance, we will set it to 16
.
Enter the name for the experiment in the Input Experiment Name box. For example, PYT_BARLEY_2022
.
Enter the starting plot number in the Starting Plot Number box. In this experiment we want the plot start at 1001
.
Enter the name of the site/location in the Input the Location box. For this experiment we will set the site as FARGO
. In the case of users will run the experiment in multiple locations, the name for each location must be enter separate by comma, for example: FARGO, CASSELTON, MINOT
.
Once we have entered all the information for our experiment on the left side panel, click the Run! button to run the design.
You will then be prompted to select the dimensions of the field from the list of options in the drop-down in the middle of the screen with the box labeled Select dimensions of field. In our case, we will select 15 x 22
.
Click the Randomize! button to randomize the experiment with the set field dimensions and to see the output plots.
If you change any of the inputs on the left side panel after running an experiment initially, you have to click the Run and Randomize buttons again, to re-run with the new inputs.
After you run a single diagonal arrangement in FielDHub and set the dimensions of the field, there are several ways to display the information contained in the field book. The first tab, Expt Design Info, shows the option to change the dimensions of the field and re-randomize, as well as a reference guide for experiment design.
On the second tab, Input Data, you can see all the entries in the randomization in a list that was generated with the inputs, as well as a table of the checks with the number of times they appear in the field.
The Randomized Field tab displays a graphical representation of the randomization of the entries in a field of the specified dimensions. The checks are each colored uniquely, showing the number of times they are distributed throughout the field. The display includes numbered labels for the rows and columns. You can copy the field as a table or save it directly as an Excel file with the Copy and Excel buttons at the top.
In the Choose % of Checks: drop-down box, users can play with different options for the total amount of checks in the field.
On the Plot Number Field tab, there is a table display of the field with the plots numbered according to the Plot Order Layout specified, either serpentine or cartesian. You can see the corresponding entries for each plot number in the field book. Like the Randomized Field tab, you can copy the table or save it as an Excel file with the Copy and Excel buttons.
The Field Book displays all the information on the experimental design in a table format. It contains the specific plot number and the row and column address of each entry, as well as the corresponding treatment on that plot. This table is searchable, and we can filter the data in relevant columns.
FielDHub
function: diagonal_arrangement()
You can run the same design with a function in the FielDHub package, diagonal_arrangement()
.
First, you need to load the FielDHub
package typing,
library(FielDHub)
Then, you can enter the information describing the above design like this:
single_diag <- diagonal_arrangement( nrows = 15, ncols = 22, lines = 300, checks = 5, l = 1, plotNumber = 1, exptName = "PYT_BARLEY_2022", locationNames = "FARGO", seed = 16, )
diagonal_arrangement()
above:nrows = 15
is the number of columns in the field.ncols = 22
is the number of rows in the field.lines = 300
is the number of genotypes.checks = 5
is the number of checks.l = 1
is the number of locations.plotNumber = 1
is the starting plot number.exptName = "PYT_BARLEY_2022"
optional name for the experimentlocationNames = "FARGO"
optional name for each location.seed = 16
is the random seed to replicate identical randomizations.single_diag
objectTo print a summary of the information that is in the object single_diag
, we can use the generic function print()
.
print(single_diag)
print(single_diag)
single_diag
objectThe function diagonal_arrangement()
returns a list consisting of all the information displayed in the output tabs in the FielDHub app: design information, plot layout, plot numbering, entries list, and field book. These are accessible by the $
operator, i.e. single_diag$layoutRandom
or single_diag$fieldBook
.
single_diag$fieldBook
is a data frame containing information about every plot in the field, with information about the location of the plot and the treatment in each plot. As seen in the output below, the field book has columns for ID
, EXPT
, LOCATION
, YEAR
, PLOT
, ROW
, COLUMN
, CHECKS
, ENTRY
, and TREATMENT
.
Let us see the first 10 rows of the field book for this experiment.
field_book <- single_diag$fieldBook head(field_book, 10)
field_book <- single_diag$fieldBook head(field_book, 10)
For plotting the layout in function of the coordinates ROW
and COLUMN
in the field book object we can use the generic function plot()
as follow,
plot(single_diag)
The figure above shows a map of an experiment randomized as a single unreplicated diagonal arrangement design. Gray plots represent the unreplicated treatments, while distinctively colored check plots are replicated throughout the field in a systematic diagonal arrangement.
Now, we show how to generate the same kind of unreplicated design with multiple experiments in the same field.
A plant breeding project needs to test 300 genotypes divided among three different experiments in amounts of 100, 120, and 80 respectively. Each experiment represents different stages of maturity. The 3 experiments are lying in a field containing 15 rows and 22 columns of plots. In addition, 5 checks are included in a systematic diagonal arrangement across experiments to fill 30 plots representing 9.1% of the total number of experimental plots.
FielDHub
can perform the randomization for the design in the problem explained above. This can be solved either through the app or the diagonal_arrangement()
function.
To generate a multiple unreplicated diagonal arrangement design using the FielDHub app:
First, go to Unreplicated Designs > Multiple Diagonal Arrangement
Then, follow the following steps where we will show how to generate this kind of design.
Import entries' list? Choose whether to import a list with entry numbers and names for genotypes or treatments.
If the selection is No
, that means the app is going to generate synthetic data for entries and names of the treatment/genotypes based on the user inputs.
If the selection is Yes
, the entries list must fulfill a specific format and must be a .csv
file. The file must have the columns ENTRY
and NAME
. The ENTRY
column must have a unique entry integer number for each treatment/genotype. The column NAME
must have a unique name that identifies each treatment/genotype. Both ENTRY and NAME must be unique, duplicates are not allowed. In the following table, we show an example of the entries list format. This example has an entry list with four checks and 8 treatments/genotypes. It is crucial to allocate the checks in the top part of the file.
ENTRY <- 1:12 NAME <- c(c("CH1","CH2","CH3","CH4"), paste0("ND-", 5:12)) df <- data.frame(ENTRY,NAME)
* **Note:** If you wish to create multiple blocks of different sizes from an imported entries list, for example, a block of size 80, 90, and 100 plots, FielDHub will read the imported entries list as checks, then the 80 entries for the first block, then the 90 entries for the second block, then the 100 entries for the last block.
library(knitr) kable(df)
Select the checkbox option Use the same entries across experiments if the purpose is to make replications instead of testing different experiments. Checking this option requires the same size for all blocks. For example, testing 100 treatments across 3 blocks require to set 300
in Input # of Entries and 100, 100, 100
as input in Input # Entries per Expt. In our case we will keep unchecked this option.
Enter the total number of entries/treatments in the Input # of Entries box, which is 300
in our case.
Enter the number of entries/treatments by experiment separate by comma in the Input # Entries per Expt box, which are 100, 120, 80
in our case.
Select 5 from the drop-down on the Input # of Checks box.
Since we want to run this experiment over 1 location, set Input # of Locations to 1
.
Select By Row
or By Column
in the Blocks Layout:. For this example we will set the By Row
experiments/blocks layout.
Select serpentine
or cartesian
in the Plot Order Layout. For this example we will set the serpentine
layout.
Enter the starting plot number for each experiment in the Starting Plot Number box. In this experiment we want the plot start at 1, 1001, 2001
for each experiment. The app also allows setting only one number for all experiments. For example, the plot number could start at 10
.
Enter the name for each experiment in the Input Experiment Name box. For example, MATURITY1, MATURITY2, MATURITY3
.
To ensure that randomization are consistent across sessions, we can set a random seed in the box labeled random seed. For instance, we will set it to 17
.
Enter the name of the site/location in the Input the Location box. For this experiment we will set the site as FARGO
. In the case of users will run the experiment in multiple locations, the name for each location must be enter separate by comma, for example: FARGO, CASSELTON, MINOT
.
Once we have entered all the information for our experiment on the left side panel, click the Run! button to run the design.
You will then be prompted to select the dimensions of the field from the list of options in the drop-down in the middle of the screen with the box labeled Select dimensions of field. In our case, we will select 15 x 22
.
Click the Randomize! button to randomize the experiment with the set field dimensions and to see the output plots.
If you change any of the inputs on the left side panel after running an experiment initially, you have to click the Run and Randomize buttons again, to re-run with the new inputs.
After you run a single diagonal arrangement in FielDHub and set the dimensions of the field, there are several ways to display the information contained in the field book. The first tab, Expt Design Info, shows the option to change the dimensions of the field and re-randomize, as well as a reference guide for experiment design.
On the second tab, Input Data, you can see all the entries in the randomization in a list that was generated with the inputs, as well as a table of the checks with the number of times they appear in the field.
The Randomized Field tab displays a graphical representation of the randomization of the entries in a field of the specified dimensions. The checks are all colored uniquely, showing the number of times they are distributed throughout the field. The display includes numbered labels for the rows and columns. You can copy the field as a table or save it directly as an Excel file with the Copy and Excel buttons at the top.
In this tab by the Choose % of Checks: box users can play with different options for the total amount of checks in the field.
On the Plot Number Field tab, there is a table display of the field with the plots numbered according to the Plot Order Layout specified, either serpentine or cartesian. You can see the corresponding entries for each plot number in the field book. Like the Randomized field tab, you can copy the table or save it as an Excel file with the Copy and Excel buttons.
The Field Book displays all the information on the experimental design in a table format. It contains the specific plot number and the row and column address of each entry, as well as the corresponding treatment on that plot. This table is searchable, and we can filter the data in relevant columns.
FielDHub
function: diagonal_arrangement()
A variation on the single diagonal arrangement included in the diagonal_arrangement()
function is the multiple diagonal arrangement, where the experiment is split into blocks of specified size.
multi_diag <- diagonal_arrangement( nrows = 15, ncols = 22, lines = 300, kindExpt = "DBUDC", blocks = c(100,120,80), checks = 5, l = 1, plotNumber = c(1, 1001, 2001), exptName = c("MATURITY1", "MATURITY2", "MATURITY3"), locationNames = "FARGO", seed = 17 )
diagonal_arrangement()
above:The description for the inputs that we used to generate the design,
nrows = 15
is the number of columns in the field.ncols = 22
is the number of rows in the field.lines = 300
is the number of genotypes.kindExpt = "DBUDC"
is an option to randomize multiple experimentsblocks = c(100,120,80)
are the blocks in multiple arrangement.checks = 5
is the number of checks.l = 1
is the number of locations.plotNumber = c(1, 1001, 2001)
is the starting plot number for each experiment. It could be just one number as well.exptName = c("MATURITY1", "MATURITY2", "MATURITY3")
is an optional name for each experiment.locationNames = "FARGO"
optional name for each location.seed = 17
is the random seed to replicate identical randomizations.multi_diag
objectFor printing a summary of the information that is in the object multi_diag
we can use the generic function print()
print(multi_diag)
print(multi_diag)
multi_diag
objectThe function diagonal_arrangement()
returns a list consisting of all the information displayed in the output tabs in the FielDHub app: design information, plot layout, plot numbering, entries list, and field book. These are accessible by the $
operator, i.e. multi_diag$layoutRandom
or multi_diag$fieldBook
.
multi_diag$fieldBook
is a data frame containing information about every plot in the field, with information about the location of the plot and the treatment in each plot. As seen in the output below, the field book has columns for ID
, EXPT
, LOCATION
, YEAR
, PLOT
, ROW
, COLUMN
, CHECKS
, ENTRY
, and TREATMENT
.
Let us see the first 10 rows of the field book for this experiment.
field_book <- multi_diag$fieldBook head(field_book, 10)
field_book <- multi_diag$fieldBook head(field_book, 10)
For plotting the layout in function of the coordinates ROW
and COLUMN
in the field book object we can use the generic function plot()
as follow,
plot(multi_diag)
The figure above shows a map of an experiment randomized as a multiple unreplicated diagonal arrangement design. Gray, salmon, and pink shade the blocks of unreplicated experiments, while distinctively colored check plots are replicated throughout the field in a systematic diagonal arrangement.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.