Skip to contents

Utility functions

Usage

# S3 method for sfc_sequence
[(x, i)

# S3 method for sfc_sequence
[(x, i) <- value

# S3 method for sfc_sequence
length(x)

# S3 method for sfc_sequence
c(...)

Arguments

x

An sfc_sequence object.

i

Numeric index.

value

An sfc_sequence object.

...

A list of sfc_sequence objects or other arguments.

Details

For efficiency, c.sfc_sequence() does not check whether the input sfc_sequence objects are compatible.

Examples

p = sfc_sequence("ABCDEFGH")
p
#> A sequence of 8 base patterns.
#>   A(0)B(0)C(0)D(0)  E(0)F(0)G(0)H(0)
p[1:4]
#> A sequence of 4 base patterns.
#>   A(0)B(0)C(0)D(0)  
p[1:4] = p[8:5]
p
#> A sequence of 8 base patterns.
#>   H(0)G(0)F(0)E(0)  E(0)F(0)G(0)H(0)
length(p)
#> [1] 8
c(p, p)
#> A sequence of 16 base patterns.
#>   H(0)G(0)F(0)E(0)  E(0)F(0)G(0)H(0)
#>   H(0)G(0)F(0)E(0)  E(0)F(0)G(0)H(0)