| CoreCollection {coreCollection} | R Documentation |
The CoreCollection class
Description
R6 class for creating a core collection based on the provided distanceMatrix,
required size of the core n and optionally a set of preselected accessions to be included
into the core.
Usage
CoreCollection(
distanceMatrix,
n,
preselected = c(),
coreSelectMethod = "A-NE",
adjustedGroupMethod = "split",
algorithm = "randomDescent",
seed = NULL
)
Arguments
distanceMatrix |
|
n |
The number of items in the core |
preselected |
An optional list of preselected accessions to be included in the core collection; the provided accessions should occur in the labels or rownames of the provided distanceMatrix |
coreSelectMethod |
The method for computing core accessions within the groups:
|
adjustedGroupMethod |
The method to handle adjusting groups when multiple preselected accessions occur within a single group:
|
algorithm |
Algorithm applied to compute a solution: currently, only |
seed |
The seed used when generating the core collection. If no seed is provided, a random
seed is chosen and each time the |
Details
Based on a provided distanceMatrix and required number n of accessions
within the core, a random set of accessions is created, implicitly dividing the full
population into initial groups based on the nearest randomly chosen random accession. If a
set of preselected accessions is provided, this initial division is adjusted using the
adjustedGroupMethod. Then, using the coreSelectMethod in the algorithm, the
core accessions within these groups are calculated, resulting in the final core collection.
Fields
adjustedBasedGroupsA list describing the initial random division of all accessions into groups, adjusted for the set of
preselectedaccessions by using the definedadjustedGroupMethod.adjustedGroupMethodThe method to handle adjusting groups when multiple preselected accessions occur within a single group.
adjustedSelectedA data.frame representing the intial random selection of accesions, adjusted for the set of
preselectedaccessions by using the definedadjustedGroupMethod, with the accession names as labels and the following columns:-
contains: the (positive) number of accessions that have this accessions as the closest random selected accession -
preselects: the number of these closest accessions that were preselected -
preselected: a boolean indicating if the random selected accession was preselected -
random: a boolean indiciating if the selected accesion was initially randomly chosen or introduced later by the appliedadjustedGroupMethod.
-
algorithmThe applied algorithm to compute the solution.
coreA data.frame representing the core collection with the accession names as labels and in the first and only column a boolean value indicating whether or not the accession was preselected.
coreSelectMethodThe applied method to select the core accessions based on the computed
adjustedBasedGroups.distanceMatrixThe distance matrix; this will allways be a dist object.
nThe required core size
popA data.frame representing the whole collection with the accession names as labels and in the first and only column:
-
result: a string describing if the accession is marked asotheror as included in thecore, and if in thecorebecause it waspreselectedor because of the appliedcoreSelectMethod.
-
preselectedThe list of preselected accessions.
randomBasedGroupsA list with the initial division into groups based on the initial random selection of accessions described by
randomSelected. Each item describes all accessions that have the random selected accesion from the label as the nearest neighbour, including the random selected accession.randomSelectedA data.frame representing the intial random selection of accesions with the accession names as labels and the following columns:
-
contains: the (positive) number of accessions that have this accessions as the closest random selected accession -
preselects: the number of these closest accessions that were preselected -
preselected: a boolean indicating if the random selected accession was preselected -
random: a boolean indiciating if the random selected accesion was randomly chosen. This will always be TRUE for this field, but including this column makes the output comparable withadjustedSelected.
-
seedThe last applied seed for the randomizer. This will only change when the
recompute()method is called and no initialseedis defined.
Methods
alternativeCore(n)The
nth alternative core withna positive integer. Provides for each accession in the core, if available, thenth nearest accession from within the same group as an alternative.clone(deep = FALSE)The default R6Class clone method.
initialize(distanceMatrix, n, preselected, coreSelectMethod, adjustedGroupMethod, algorithm, seed)Initialisation of the object, is called automatically on creation or recomputing.
measure(coreSelectMethod)The measure for the provided
coreSelectMethod. If no value is provided, the current selectedcoreSelectMethodis used. The measure is used by the algorithm to compute the core collection.measures()A data.frame with the available
coreSelectMethodsas labels and in the first and only column the measures for these methods.recompute()Recompute the core collection: If on initialisation of the object a seed was provided, this same seed will be applied and therefore the same core collection will be created. Otherwise, a new seed is generated, resulting in a new core.
print()Create a summary of the core collection object, same as
summary().summary()Create a summary of the core collection object, same as
print().
See Also
Other core collection:
coreCollection-package