@@ -42,81 +42,24 @@ tbl_format_header.tidySummarizedExperiment <- function(x, setup, ...) {
4242 style_subtle(pillar___format_comment(header , width = setup $ width ))
4343}
4444
45- # ' Printing tibbles
46- # '
47- # ' @description
48- # ' `r lifecycle::badge("maturing")`
49- # '
50- # ' One of the main features of the `tbl_df` class is the printing:
51- # '
52- # ' * Tibbles only print as many rows and columns as fit on one screen,
53- # ' supplemented by a summary of the remaining rows and columns.
54- # ' * Tibble reveals the type of each column, which keeps the user informed about
55- # ' whether a variable is, e.g., `<chr>` or `<fct>` (character versus factor).
56- # '
57- # ' Printing can be tweaked for a one-off call by calling `print()` explicitly
58- # ' and setting arguments like `n` and `width`. More persistent control is
59- # ' available by setting the options described below.
60- # '
61- # ' @inheritSection pillar::`pillar-package` Package options
62- # ' @section Package options:
63- # '
64- # ' The following options are used by the tibble and pillar packages
65- # ' to format and print `tbl_df` objects.
66- # ' Used by the formatting workhorse `trunc_mat()` and, therefore,
67- # ' indirectly, by `print.tbl()`.
68- # '
69- # ' * `tibble.print_max`: Row number threshold: Maximum number of rows printed.
70- # ' Set to `Inf` to always print all rows. Default: 20.
71- # ' * `tibble.print_min`: Number of rows printed if row number threshold is
72- # ' exceeded. Default: 10.
73- # ' * `tibble.width`: Output width. Default: `NULL` (use `width` option).
74- # ' * `tibble.max_extra_cols`: Number of extra columns printed in reduced form.
75- # ' Default: 100.
76- # '
77-
78- # '
79- # ' @param x Object to format or print.
80- # ' @param ... Other arguments passed on to individual methods.
81- # ' @param n Number of rows to show. If `NULL`, the default, will print all rows
82- # ' if less than option `tibble.print_max`. Otherwise, will print
83- # ' `tibble.print_min` rows.
84- # ' @param width Width of text output to generate. This defaults to `NULL`, which
85- # ' means use `getOption("tibble.width")` or (if also `NULL`)
86- # ' `getOption("width")`; the latter displays only the columns that fit on one
87- # ' screen. You can also set `options(tibble.width = Inf)` to override this
88- # ' default and always print all columns.
89- # ' @param n_extra Number of extra columns to print abbreviated information for,
90- # ' if the width is too small for the entire tibble. If `NULL`, the default,
91- # ' will print information about at most `tibble.max_extra_cols` extra columns.
92- # '
93- # ' @return Nothing
94- # '
95- # ' @examples
96-
97- # ' @name formatting
98- NULL
99-
100-
101-
10245# ' @name formatting
10346# ' @rdname formatting
10447# ' @aliases print
10548# ' @inherit tibble::formatting
10649# ' @return Prints a message to the console describing
107- # ' the contents of the `tidyseurat `.
108- # '
50+ # ' the contents of the `tidySingleCellExperiment `.
51+ # '
10952# ' @param n_extra Number of extra columns to print abbreviated information for,
11053# ' if the width is too small for the entire tibble. If `NULL`, the default,
11154# ' will print information about at most `tibble.max_extra_cols` extra columns.
11255# '
11356# ' @examples
114- # ' library(dplyr )
115- # ' pasilla %>% print()
57+ # ' data(pasilla )
58+ # ' print(pasilla )
11659# '
11760# ' @importFrom vctrs new_data_frame
118- # ' @importFrom rlang is_empty
119- # ' @importFrom stringr str_replace
61+ # ' @importFrom SummarizedExperiment assayNames
62+ # ' @importFrom stats setNames
12063# ' @export
12164print.SummarizedExperiment <- function (x , ... , n = NULL ,
12265 width = NULL , n_extra = NULL ) {
@@ -149,9 +92,9 @@ print.SummarizedExperiment <- function(x, ..., n=NULL,
14992
15093 my_tibble | >
15194 new_data_frame(class = c(" tidySummarizedExperiment" , " tbl" )) %> %
152- add_attr( nrow(x ), " number_of_features" ) %> %
153- add_attr( ncol(x ), " number_of_samples" ) %> %
154- add_attr( assays(x ) %> % names , " assay_names" ) %> %
95+ add_attr(nrow(x ), " number_of_features" ) %> %
96+ add_attr(ncol(x ), " number_of_samples" ) %> %
97+ add_attr(assays(x ) %> % names , " assay_names" ) %> %
15598
15699 # Set fake dimensions for efficiancy
157100 add_attr(
0 commit comments