Skip to contents

Applies to both rows and columns, enabling quick inspection during interactive use.

Usage

headtail(x, ...)

# S4 method for DFrame
headtail(x, n = 2L)

# S4 method for GRanges
headtail(x, n = 2L)

# S4 method for Matrix
headtail(x, n = 2L)

# S4 method for SummarizedExperiment
headtail(x, n = 2L)

Arguments

x

Object.

n

integer(1). Positive integer denoting the number of first and last items to include.

...

Additional arguments.

Value

character.

Details

Inspired by the print method for DataFrame class.

Functions

  • headtail(DFrame): Same method as data.frame.

  • headtail(GRanges): Summarize the ranges.

  • headtail(Matrix): Same method as matrix.

  • headtail(SummarizedExperiment): Summarize the primary assay.

Note

Updated 2023-09-20.

Examples

data(RangedSummarizedExperiment, package = "AcidTest")

## SummarizedExperiment ====
object <- RangedSummarizedExperiment
headtail(object)
#> [1] "        sample01 sample02 ... sample11 sample12"
#> [2] "gene001       58       26 ...       26       41"
#> [3] "gene002       14       20 ...        0        7"
#> [4] "...          ...      ... ...      ...      ..."
#> [5] "gene499        6       27 ...        4        8"
#> [6] "gene500      102       64 ...       79       64"