Generate the sparse or p-rep allocation to multiple locations.
Usage
do_optim(
design = "sparse",
lines,
l,
copies_per_entry,
add_checks = FALSE,
checks = NULL,
rep_checks = NULL,
force_balance = TRUE,
seed,
data = NULL
)Arguments
- design
Type of experimental design. It can be
preporsparse- lines
Number of genotypes, experimental lines or treatments.
- l
Number of locations or sites. By default
l = 1.- copies_per_entry
Number of copies per plant. When design is
sparsethencopies_per_entryshould be less thanl- add_checks
Option to add checks. Optional if
design = "prep"- checks
Number of genotypes checks.
- rep_checks
Replication for each check.
- force_balance
Get balanced unbalanced locations. By default
force_balance = TRUE.- seed
(optional) Real number that specifies the starting seed to obtain reproducible designs.
- data
(optional) Data frame with 2 columns:
ENTRY | NAME. ENTRY must be numeric.
Value
A list with five elements, classed c("fieldhub_sparse_optimization",
"Sparse") or c("fieldhub_multi_prep_optimization", "MultiPrep"): the
legacy Sparse/MultiPrep class is retained for compatibility,
with an additional fieldhub_* class alongside it.
multi_location_datais a data frame with the entries of every location:LOCATION | ENTRY | NAME, with aREPScolumn for p-rep allocations.list_locsis a list with each location list of entries.allocationis a data frame of test-entry copy counts, with one column per location.size_locationsis a named vector of test-entry copies per location, excluding checks.metadatarecords the allocation type, schema version, seed, random-number settings, package version and evaluated input parameters. With the same package versions and RNG settings, rebuild the allocation withdo.call(do_optim, x$metadata$parameters).