Learn R Programming

tidyfast (version 0.2.1)

dt_print_options: Set Print Method

Description

The function allows the user to define options relating to the print method for data.table.

Usage

dt_print_options(
  class = TRUE,
  topn = 5,
  rownames = TRUE,
  nrows = 100,
  trunc.cols = TRUE
)

Arguments

class

should the variable class be printed? (options("datatable.print.class"))

topn

the number of rows to print (both head and tail) if nrows(DT) > nrows. (options("datatable.print.topn"))

rownames

should rownames be printed? (options("datatable.print.rownames"))

nrows

total number of rows to print (options("datatable.print.nrows"))

trunc.cols

if TRUE, only the columns that fit in the console are printed (with a message stating the variables not shown, similar to tibbles; options("datatable.print.trunc.cols")). This only works on data.table versions higher than 1.12.6 (i.e. not currently available but anticipating the eventual release).

Value

None. This function is used for its side effect of changing options.

Examples

Run this code
# NOT RUN {
dt_print_options(
  class = TRUE,
  topn = 5,
  rownames = TRUE,
  nrows = 100,
  trunc.cols = TRUE)

# }

Run the code above in your browser using DataLab