Skip to contents

mapper object summaries

Usage

# S3 method for class 'bru_mapper'
summary(object, ..., prefix = "", initial = prefix, depth = 1)

# S3 method for class 'bru_mapper_multi'
summary(object, ..., prefix = "", initial = prefix, depth = 1)

# S3 method for class 'bru_mapper_pipe'
summary(object, ..., prefix = "", initial = prefix, depth = 1)

# S3 method for class 'bru_mapper_collect'
summary(object, ..., prefix = "", initial = prefix, depth = 1)

# S3 method for class 'bru_mapper_sum'
summary(object, ..., prefix = "", initial = prefix, depth = 1)

# S3 method for class 'bru_mapper_repeat'
summary(object, ..., prefix = "", initial = prefix, depth = 1)

# S3 method for class 'summary_bru_mapper'
print(x, ...)

# S3 method for class 'bru_mapper'
print(x, ..., prefix = "", initial = prefix, depth = 1)

Arguments

object

bru_mapper object to summarise

...

Unused arguments

prefix

character prefix for each line. Default "".

initial

character prefix for the first line. Default initial=prefix.

depth

The recursion depth for multi/collection/pipe mappers. Default 1, to only show the collection, and not the contents of the sub-mappers.

x

Object to be printed

Examples

mapper <-
  bru_mapper_pipe(
    list(
      bru_mapper_multi(list(
        A = bru_mapper_index(2),
        B = bru_mapper_index(3)
      )),
      bru_mapper_index(2)
    )
  )
summary(mapper, depth = 2)
#> pipe = multi(A = index, B = index) -> index
mapper <-
  bru_mapper_repeat(
    bru_mapper_multi(
      list(
        A = bru_mapper_index(2),
        B = bru_mapper_index(3)
      )
    ),
    3
  )
summary(mapper)
#> repeat(3 x multi(A = index, B = index))
summary(mapper, depth = 0)
#> repeat(3 x multi)