as_lines: Create a line-by-line text representation of an R object

View source: R/as_lines.R

as_linesR Documentation

Create a line-by-line text representation of an R object

Description

Creates a line-by-line representation of an R object (usually a Tatoo_table). This is the function powers all Tatoo_table print methods.

Usage

as_lines(x, color = TRUE, ...)

## S3 method for class 'data.frame'
as_lines(x, color = TRUE, ...)

## S3 method for class 'Tagged_table'
as_lines(x, color = TRUE, ...)

## S3 method for class 'Mashed_table'
as_lines(
  x,
  color = TRUE,
  mash_method = attr(x, "mash_method"),
  insert_blank_row = attr(x, "insert_blank_row"),
  id_vars = attr(x, "id_vars"),
  ...
)

## S3 method for class 'Stacked_table'
as_lines(x, color = TRUE, ...)

## S3 method for class 'Composite_table'
as_lines(x, color = TRUE, ...)

## S3 method for class 'Tatoo_report'
as_lines(x, color = TRUE, ...)

## S3 method for class 'TT_meta'
as_lines(x, color = TRUE, ...)

Arguments

x

Any R object.

color

Use colors (via colt)

...

passed on methods.

mash_method

either "row" or "col". Should the tables be mashed together with alternating rows or with alternating columns?

insert_blank_row

Only if mashing rows: logical. Whether to insert blank rows between mash-groups. Warning: this converts all columns to character. Use with care.

id_vars

Only if mashing columns: one ore more colnames of the tables to be mashed. If supplied, columns of both input tables are combined with merge(), otherwise cbind() is used.

Value

A character vector (one element per line).


tatoo documentation built on March 31, 2023, 8:16 p.m.