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 class 'DFrame'
headtail(x, n = 2L)
# S4 method for class 'GRanges'
headtail(x, n = 2L)
# S4 method for class 'Matrix'
headtail(x, n = 2L)
# S4 method for class 'SummarizedExperiment'
headtail(x, n = 2L)
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"