Return the first and last parts of an object
Source:R/AllGenerics.R
, R/headtail-methods.R
headtail.Rd
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.
Functions
headtail(DFrame)
: Same method asdata.frame
.headtail(GRanges)
: Summarize the ranges.headtail(Matrix)
: Same method asmatrix
.headtail(SummarizedExperiment)
: Summarize the primaryassay
.
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"