bstr_add_seq_at: Add sequence attribute

Description Usage Arguments Examples

View source: R/class-bstr.R

Description

Add sequence attribute

Usage

1
bstr_add_seq_at(bstrobj, attr_name, attrs)

Arguments

bstrobj

bstr class object or character vector

attr_name

one string. an attribute name.

attrs

sequence attributes. its length must equal to the length object

Examples

1
2
3
4
5
6
temp <- dstr_rand_seq(3, 200, seed = 1) %>%
  bstr_add_seq_at("circle", c(TRUE, FALSE, TRUE))
temp
temp %>% str
# dstr_rand_seq(3, 200) %>% bstr_add_seq_at("circle", TRUE)
temp %>% bstr_add_seq_at("circle", c(FALSE, TRUE, TRUE))

t-arae/bstringr documentation built on March 18, 2021, 3:08 a.m.