individuals2strata | R Documentation |
If your individuals have a consistent naming scheme
(e.g. SPECIES-POPULATION-MATURITY-YEAR-ID = CHI-QUE-ADU-2014-020),
use this function to rapidly create a strata file.
Several functions in radiator and assigner requires
a strata
argument, i.e. a data frame with the individuals and
associated groupings. If you have already run
stacks on your data,
the strata file is similar to a stacks 'population map file', make sure you
have the required column names (INDIVIDUALS
and STRATA
).
individuals2strata(data, strata.start, strata.end, filename = NULL)
data |
A file or data frame object with individuals in a column. The
column name is |
strata.start |
(integer) The start of your strata id. See details for more info. |
strata.end |
(integer) The end of your strata id. See details for more info. |
filename |
(optional) The file name for the strata object if you
want to save it in the working directory.
Default: |
strata.start
and strata.end
The info must be found within the name of your individual sample. If not,
you'll have to create a strata file by hand, the old fashion way.
e.g. if your individuals are identified
in this form : SPECIES-POPULATION-MATURITY-YEAR-ID = CHI-QUE-ADU-2014-020,
then, to have the population id in the STRATA
column,
strata.start = 5
and strata.end = 7
.
The STRATA
column can be any hierarchical grouping.
a strata object and file, if requested. The file is tab delimited
with 2 columns named:
INDIVIDUALS
and STRATA
.
The STRATA
column can be any hierarchical grouping.
Thierry Gosselin thierrygosselin@icloud.com
read_strata
, summary_strata
,
change_pop_names
,
join_strata
, generate_strata
## Not run:
strata.abalone <- individuals2strata(
data = "individuals.abalone.tsv",
strata.start = 5,
strata.end = 7,
filename = "strata.abalone.tsv"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.