View source: R/30-api-flexseq-print.R
| print.FingerTree | R Documentation |
Print a compact summary of a finger tree
## S3 method for class 'FingerTree'
print(x, max_elements = 4L, show_custom_monoids = FALSE, ...)
## S3 method for class 'Deep'
print(x, ...)
## S3 method for class 'Single'
print(x, ...)
## S3 method for class 'Empty'
print(x, ...)
x |
FingerTree. |
max_elements |
Maximum number of elements shown in preview ( |
show_custom_monoids |
Logical; show attached non-default monoids and
their root cached measures. Default |
... |
Passed through to |
x, invisibly.
x <- as_flexseq(setNames(as.list(1:6), letters[1:6]))
print(x, max_elements = 4)
sum_m <- measure_monoid(`+`, 0, function(el) as.numeric(el))
print(add_monoids(as_flexseq(1:3), list(sum = sum_m)), max_elements = 0, show_custom_monoids = TRUE)
y <- as_flexseq(as.list(1:6))
print(y, max_elements = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.