rhoneycomb_documentation

A short guide to using the package “rhoneycomb”

The package “rhoneycomb” is a useful statistical tool for the construction and analysis of honeycomb selection designs.

Installation and usage

This section shows the installation of the package and the usage of underlying functions.

Installation

To install the package from CRAN, and then load it, use the following commands:

install.packages("rhoneycomb")
library(rhoneycomb)

Example: Generate available Replicated Selection Designs

First, to begin the procedure, we must choose one among the available replicated designs. We do so by using the following command which returns a data frame containing the available designs. Here we run the function with a vector that contains numbers 1 to 60:

generate(1:60)
##     R X Y K1 K2 K3 K4 K5 K6      Type Groups GroupSize SetRows
## 1   3 1 1  1  1  -  -  -  - Ungrouped      1         3       2
## 2   4 2 0  -  -  1  2  -  -   Grouped      2         2       4
## 3   7 2 1  4  2  -  -  -  - Ungrouped      1         7      14
## 4   9 3 0  -  -  2  3  5  6   Grouped      3         3       6
## 5  12 2 2  -  -  4  7  -  -   Grouped      2         6       4
## 6  13 3 1  9  3  -  -  -  - Ungrouped      1        13      26
## 7  16 4 0  -  -  3  4 11 12   Grouped      4         4       8
## 8  19 3 2  7 11  -  -  -  - Ungrouped      1        19      38
## 9  21 4 1 16  4  -  -  -  - Ungrouped      1        21      14
## 10 25 5 0  -  -  4  5 19 20   Grouped      5         5      10
## 11 27 3 3  -  -  7 10 16 19   Grouped      3         9       6
## 12 28 4 2  -  -  9 18 11 16   Grouped      2        14      28
## 13 31 5 1 25  5  -  -  -  - Ungrouped      1        31      62
## 14 36 6 0  -  -  5  6 29 30   Grouped      6         6      12
## 15 37 4 3 10 26  -  -  -  - Ungrouped      1        37      74
## 16 39 5 2 16 22  -  -  -  - Ungrouped      1        39      26
## 17 43 6 1 36  6  -  -  -  - Ungrouped      1        43      86
## 18 48 4 4  -  - 10 13 34 37   Grouped      4        12       8
## 19 49 5 3 30 18  -  -  -  - Ungrouped      1        49      98
## 20 49 7 0  -  -  6  7 41 42   Grouped      7         7      14
## 21 52 6 2  -  - 16 35 22 29   Grouped      2        26      52
## 22 57 7 1 49  7  -  -  -  - Ungrouped      1        57      38

Example: Analysis of Experimental Data.

To analyze the data, first we must initialize a data frame containing basic information about the entries. After that, we use a function to analyze the data we provide.

Replicated Design

Initialization

We initialize the selection design using the HDR command. Here:

main_data<-HDR(7,2,10,10,1)

head(main_data,25) #Use the head function to get the top 25 rows.
##    Entry Row Plant XPos      YPos Data
## 1      7   1     1  1.0 0.8660254   NA
## 2      1   1     2  2.0 0.8660254   NA
## 3      2   1     3  3.0 0.8660254   NA
## 4      3   1     4  4.0 0.8660254   NA
## 5      4   1     5  5.0 0.8660254   NA
## 6      5   1     6  6.0 0.8660254   NA
## 7      6   1     7  7.0 0.8660254   NA
## 8      7   1     8  8.0 0.8660254   NA
## 9      1   1     9  9.0 0.8660254   NA
## 10     2   1    10 10.0 0.8660254   NA
## 11     5   2     1  1.5 1.7320508   NA
## 12     6   2     2  2.5 1.7320508   NA
## 13     7   2     3  3.5 1.7320508   NA
## 14     1   2     4  4.5 1.7320508   NA
## 15     2   2     5  5.5 1.7320508   NA
## 16     3   2     6  6.5 1.7320508   NA
## 17     4   2     7  7.5 1.7320508   NA
## 18     5   2     8  8.5 1.7320508   NA
## 19     6   2     9  9.5 1.7320508   NA
## 20     7   2    10 10.5 1.7320508   NA
## 21     2   3     1  1.0 2.5980762   NA
## 22     3   3     2  2.0 2.5980762   NA
## 23     4   3     3  3.0 2.5980762   NA
## 24     5   3     4  4.0 2.5980762   NA
## 25     6   3     5  5.0 2.5980762   NA

Replicated Design: Ring Analysis

After this step, we pass the response variable to the “Data” column of the data frame generated by one of the functions HDR, HDNR0, HDNR1 or HDNR3.

main_data$Data<-wheat_data$main_spike_weight
result<-analysis(main_data,"Data",6)

head(result[[1]],10) #Use the head function to get the top 10 rows.
##    Entry Row Plant XPos      YPos Data NumR    MeanR       PYI     Mean  N
## 1      7   1     1    1 0.8660254 5.33    2 3.130000 2.8997846 4.660000 14
## 2      1   1     2    2 0.8660254 3.62    3 4.596667 0.6201991 4.285333 15
## 3      2   1     3    3 0.8660254   NA    4 4.410000        NA 3.380000 14
## 4      3   1     4    4 0.8660254 5.38    3 4.006667 1.8030100 5.471538 13
## 5      4   1     5    5 0.8660254 4.10    4 4.300000 0.9091401 3.573571 14
## 6      5   1     6    6 0.8660254 4.30    4 4.330000 0.9861912 4.806154 13
## 7      6   1     7    7 0.8660254 5.86    4 4.025000 2.1196466 5.248667 15
## 8      7   1     8    8 0.8660254 5.40    4 3.905000 1.9122534 4.660000 14
## 9      1   1     9    9 0.8660254 1.97    4 5.095000 0.1495010 4.285333 15
## 10     2   1    10   10 0.8660254 2.52    2 4.050000 0.3871605 3.380000 14
##           sd        HI       PPE
## 1  1.4376209 10.507105 30.468342
## 2  0.8598245 24.839888 15.405676
## 3  1.0165099 11.056310        NA
## 4  1.7710395  9.544703 17.209195
## 5  0.8958332 15.912949 14.467100
## 6  1.2291700 15.288730 15.077611
## 7  1.0800322 23.616992 50.059678
## 8  1.4376209 10.507105 20.092248
## 9  0.8598245 24.839888  3.713588
## 10 1.0165099 11.056310  4.280566
result[[2]] 
##   Entry  N     Mean       CV        sd        HI       GYI       GPE      mPYI
## 1     1 15 4.285333 20.06435 0.8598245 24.839888 0.9142752 22.710493 0.9565541
## 2     2 14 3.380000 30.07426 1.0165099 11.056310 0.5687758  6.288562 0.6300110
## 3     3 13 5.471538 32.36822 1.7710395  9.544703 1.4904816 14.226205 1.7265854
## 4     4 14 3.573571 25.06829 0.8958332 15.912949 0.6357885 10.117270 0.6605181
## 5     5 13 4.806154 25.57492 1.2291700 15.288730 1.1500138 17.582250 1.2713303
## 6     6 15 5.248667 20.57727 1.0800322 23.616992 1.3715312 32.391442 1.6861838
## 7     7 14 4.660000 30.85023 1.4376209 10.507105 1.0811340 11.359589 1.3320829
##        mPPE        CRS
## 1 23.760698  0.4652112
## 2  6.965597 -0.4171135
## 3 16.479746  1.1981664
## 4 10.510791 -0.3036280
## 5 19.437026  1.1715222
## 6 39.822589  1.3795885
## 7 13.996335         NA

Replicated Design: Blocks Analysis

By using the arguments blocks=TRUE in the analysis function, the data is being analyzed using complete moving replicate. If we also use the arguments “row_element” and “plant_element”, the plants included in the specific block are displayed.

result<-analysis(main_data,"Data",blocks=TRUE,row_element=5,plant_element=5)

head(result[[1]],10) #Use the head function to get the top 10 rows.
##    Entry Row Plant XPos      YPos Data SizeB    MeanB       PYI     Mean  N
## 1      7   1     1    1 0.8660254 5.33     6 3.616667 2.1718881 4.660000 14
## 2      1   1     2    2 0.8660254 3.62     5 3.938000 0.8450175 4.285333 15
## 3      2   1     3    3 0.8660254   NA     6 4.186667       NaN 3.380000 14
## 4      3   1     4    4 0.8660254 5.38     5 4.426000 1.4775485 5.471538 13
## 5      4   1     5    5 0.8660254 4.10     6 4.321667 0.9000470 3.573571 14
## 6      5   1     6    6 0.8660254 4.30     6 4.641667 0.8582010 4.806154 13
## 7      6   1     7    7 0.8660254 5.86     6 3.821667 2.3512003 5.248667 15
## 8      7   1     8    8 0.8660254 5.40     6 4.018333 1.8059079 4.660000 14
## 9      1   1     9    9 0.8660254 1.97     6 4.651667 0.1793557 4.285333 15
## 10     2   1    10   10 0.8660254 2.52     5 4.644000 0.2944535 3.380000 14
##           sd        HI       PPE
## 1  1.4376209 10.507105 22.820257
## 2  0.8598245 24.839888 20.990141
## 3  1.0165099 11.056310       NaN
## 4  1.7710395  9.544703 14.102762
## 5  0.8958332 15.912949 14.322402
## 6  1.2291700 15.288730 13.120803
## 7  1.0800322 23.616992 55.528279
## 8  1.4376209 10.507105 18.974864
## 9  0.8598245 24.839888  4.455176
## 10 1.0165099 11.056310  3.255569
result[[2]] 
##   Entry  N     Mean       CV        sd        HI       GYI       GPE      mPYI
## 1     1 15 4.285333 20.06435 0.8598245 24.839888 0.9142752 22.710493 0.9864759
## 2     2 14 3.380000 30.07426 1.0165099 11.056310 0.5687758  6.288562 0.5664656
## 3     3 13 5.471538 32.36822 1.7710395  9.544703 1.4904816 14.226205 1.6905052
## 4     4 14 3.573571 25.06829 0.8958332 15.912949 0.6357885 10.117270 0.6503943
## 5     5 13 4.806154 25.57492 1.2291700 15.288730 1.1500138 17.582250 1.2570241
## 6     6 15 5.248667 20.57727 1.0800322 23.616992 1.3715312 32.391442 1.6977492
## 7     7 14 4.660000 30.85023 1.4376209 10.507105 1.0811340 11.359589 1.2413205
##        mPPE        CRS
## 1 24.503951  0.4652112
## 2  6.263019 -0.4171135
## 3 16.135371  1.1981664
## 4 10.349692 -0.3036280
## 5 19.218303  1.1715222
## 6 40.095729  1.3795885
## 7 13.042686         NA

Unreplicated Design

Initialization

Since there is no control entry in HDNR0 design, we must only provide number of rows, number of plants and interplant distance to the function. Here:

main_data<-HDNR0(10,10,1)

main_data$Data<-wheat_data$main_spike_weight
head(main_data,10) #Use the head function to get the top 10 rows.
##    Entry Row Plant XPos      YPos Data
## 1      1   1     1    1 0.8660254 5.33
## 2      2   1     2    2 0.8660254 3.62
## 3      3   1     3    3 0.8660254   NA
## 4      4   1     4    4 0.8660254 5.38
## 5      5   1     5    5 0.8660254 4.10
## 6      6   1     6    6 0.8660254 4.30
## 7      7   1     7    7 0.8660254 5.86
## 8      8   1     8    8 0.8660254 5.40
## 9      9   1     9    9 0.8660254 1.97
## 10    10   1    10   10 0.8660254 2.52

For the HDNR1 design we must also add the value of K as first argument in the function:

main_data<-HDNR1(7,10,10,1)

main_data$Data<-wheat_data$main_spike_weight

head(main_data,10) #Use the head function to get the top 10 rows.
##       Entry Row Plant XPos      YPos Data
## 1  Control1   1     1    1 0.8660254 5.33
## 2         2   1     2    2 0.8660254 3.62
## 3         3   1     3    3 0.8660254   NA
## 4         4   1     4    4 0.8660254 5.38
## 5         5   1     5    5 0.8660254 4.10
## 6         6   1     6    6 0.8660254 4.30
## 7         7   1     7    7 0.8660254 5.86
## 8  Control1   1     8    8 0.8660254 5.40
## 9         8   1     9    9 0.8660254 1.97
## 10        9   1    10   10 0.8660254 2.52

Unreplicated Design: Analysis

Analysis of the unreplicated designs is the same as for the replicated ones, except that the analysis function returns only one data frame.

result<-analysis(main_data,"Data")
head(result[[1]],10) #Use the head function to get the top 10 rows.
##       Entry Row Plant XPos      YPos Data NumR    MeanR       PYI
## 1  Control1   1     1    1 0.8660254 5.33    2 3.130000 2.8997846
## 2         2   1     2    2 0.8660254 3.62    3 4.596667 0.6201991
## 3         3   1     3    3 0.8660254   NA    4 4.410000        NA
## 4         4   1     4    4 0.8660254 5.38    3 4.006667 1.8030100
## 5         5   1     5    5 0.8660254 4.10    4 4.300000 0.9091401
## 6         6   1     6    6 0.8660254 4.30    4 4.330000 0.9861912
## 7         7   1     7    7 0.8660254 5.86    4 4.025000 2.1196466
## 8  Control1   1     8    8 0.8660254 5.40    4 3.905000 1.9122534
## 9         8   1     9    9 0.8660254 1.97    4 5.095000 0.1495010
## 10        9   1    10   10 0.8660254 2.52    2 4.050000 0.3871605