get_segs | R Documentation |
get_segs
divides a bullet signature/profile (a numeric vector) into consecutive,
non-overlapping, basis segments of the same desired length. If the profile
starts or ends with a sequence of NA
(missing values), the NA
s will be trimmed.
If the very last segment does not have the desired length, it will be dropped.
get_segs(x, len = 50)
x |
a numeric vector, vector of the bullet signature/profile |
len |
integer: the desired length of a basis segment |
list with basis segments and their corresponding indices in the profile
data("bullets") land2_3 <- bullets$sigs[bullets$bulletland == "2-3"][[1]] x <- land2_3$sig segments <- get_segs(x, len = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.