formatting: Printing multiple instance data frames

formattingR Documentation

Printing multiple instance data frames

Description

Specialized print methods for the mi_df, mild_df classes. These return helpful information such as the number of rows, columns, bags, and instances (for mild_df objects).

These methods print the data frame based on the underlying subclass. This allows for additional arguments that can be passed to print.tbl() when the subclass is a tibble (tbl_df, tbl), documented below.

Usage

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

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

Arguments

x

Object to format or print.

...

Passed to other methods. See print.tbl() or details for more information.

Details

The following extra arguments are available when x has subclass tbl:

  • n: Number of rows to show. If NULL, the default, will print all rows if less than the print_max option. Otherwise, will print as many rows as specified by the print_min option.

  • width: Width of text output to generate. This defaults to NULL, which means use the width option.

  • max_extra_cols: Number of extra columns to print abbreviated information for, if the width is too small for the entire tibble. If NULL, the max_extra_cols option is used. The previously defined n_extra argument is soft-deprecated.

  • max_footer_lines: Maximum number of footer lines. If NULL, the max_footer_lines option is used.

Value

The object passed in x, invisibly. Primarily called to print the object to the console.

Examples

data("ordmvnorm")
print(as_mi_df(ordmvnorm, instance_label = "inst_label"))

print(as_mi_df(ordmvnorm, instance_label = "inst_label"), n = 2)


mildsvm documentation built on July 14, 2022, 9:08 a.m.