print.unitted: Print a unitted object

Description Usage Arguments Value Examples

Description

For many data types, print.unitted includes the units in its output. For data.frames, for example, it adds a second header row to display the units of each column.

Print a unitted data.frame

Print a unitted_tbl_df

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'unitted'
print(x, ...)

## S4 method for signature 'data.frame'
.unitted_print(x, ..., digits = NULL, quote = FALSE,
  right = TRUE, row.names = TRUE)

## S4 method for signature 'tbl_df'
.unitted_print(x, ..., n = NULL, width = NULL,
  n_extra = NULL)

Arguments

x

The unitted object

...

other arguments to print

digits

the minimum number of significant digits to be used: see print.default.

quote

logical, indicating whether or not entries should be printed with surrounding quotes.

right

logical, indicating whether or not strings should be right-aligned. The default is right-alignment.

row.names

logical (or character vector), indicating whether (or what) row names should be printed.

n

As in tibble's formatting, Number of rows to show. If 'NULL', the default, will print all rows if less than option 'tibble.print_max'. Otherwise, will print 'tibble.print_min' rows.

width

As in tibble's formatting, Width of text output to generate. This defaults to NULL, which means use 'getOption("tibble.width")' or (if also NULL) 'getOption("width")'; the latter displays only the columns that fit on one screen. You can also set 'options(tibble.width = Inf)' to override this default and always print all columns.

n_extra

As in tibble's formatting, Number of extra columns to print abbreviated information for, if the width is too small for the entire tibble. If 'NULL', the default, will print information about at most 'tibble.max_extra_cols' extra columns.

Value

An invisible unitted vector

Examples

1
2
head(u(data.frame(x = u(1:500,"A"), y = u(runif(500),"B"), z = u(500:1,"C"))))
tibble::as_tibble(u(list(x = u(1:500,"A"), y = u(runif(500),"B"), z = u(500:1,"C"))))

appling/unitted documentation built on May 10, 2019, 12:44 p.m.