Parsable string to be supplied to print, data.frame, etc.

strprint(object, n = 2)

Arguments

object

R6 object

n

Number of parameters to display before & after ellipsis

Value

String representation of the distribution.

Details

strprint is a suggested method that should be included in all R6 classes to be passed to methods such as cat, summary and print. Additionally can be used to easily parse R6 objects into data-frames, see examples.

Examples

Triangular$new()$strprint()
#> [1] "Tri(lower = 0, upper = 1, mode = 0.5)"
Triangular$new()$strprint(1)
#> [1] "Tri(lower = 0,...,mode = 0.5)"