View source: R/split_cap_hist.R
split_cap_hist | R Documentation |
Split a vector of capture histories into a matrix with one column for each occasion
split_cap_hist(cap_hist, sep = "", n = 2, prefix = "t", make.numeric = FALSE)
cap_hist |
A vector of capture histories. |
sep |
What separates the individual history values |
n |
Number of sampling events in each history |
prefix |
Prefix for labeling columns of matrix |
make.numeric |
Change the expanded columns to numeric from character? |
@template data.cap_hist
A matrix of capture histories with 1 column per sampling event
# standard 2 character capture histor
data(data_rodli)
Petersen::split_cap_hist(data_rodli$cap_hist)
# history vector with ".." separating the fields
test <- c("1..1","1..0")
split_cap_hist(test, sep=stringr::fixed(".."))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.