selectSome: Select and return only some entries from a vector

View source: R/showUtils.R

selectSomeR Documentation

Select and return only some entries from a vector

Description

selectSome works well in show methods. It abbreviates a vector input depending on the maxToShow argument.

Usage

selectSome(
  obj,
  maxToShow = 5,
  ellipsis = "...",
  ellipsisPos = c("middle", "end", "start"),
  quote = FALSE
)

Arguments

obj

character() A vector to be abbreviated for display purposes

maxToShow

numeric(1) The maximum number of values to show in the output (default: 5)

ellipsis

character(1) The symbol used to abbreviate values in the vector (default: "...")

ellipsisPos

character(1) The location for the ellipsis in the output, by default in the "middle" but can be moved to either the "end" or the "start".

quote

logical(1) Whether or not to add a single quote around the obj input. This only works for character type inputs.

Value

An abbreviated output of obj

Author(s)

M. Morgan, H. Pagès

Examples


letters

selectSome(letters)


Bioconductor/BiocUtils documentation built on Oct. 31, 2024, 1:35 a.m.