Learn R Programming

genomeIntervals (version 1.28.0)

c: c extension for the genomeIntervals package

Description

This function combines several genome intervals (stranded or not) objects into a single one.

Usage

"c"(x, ..., recursive = FALSE)

Arguments

x
a Genome_intervals or Genome_intervals_stranded object - not mandatory.
...
two (one if x is defined) or more Genome_intervals or Genome_intervals_stranded objects.
recursive
inherited from the base c function definition and not used.

Value

  • A single Genome_intervals or Genome_intervals_stranded object. Input objects are combined in their order of appearance in the the argument list.
  • If any input argument is not a Genome_intervals, list(...) is returned instead.
##'

Details

If the arguments have mixed classes ( both Genome_intervals or Genome_intervals_stranded), then they are coerced to Genome_intervals before combination. Otherwise, the common class is used. Ifa list is provided with NULL entries, these are discarded. If a vector of object is provided with non genomeIntervals classes, then a list, ordered as the input vector, is returned.

Examples

Run this code
##' load toy examples
  data("gen_ints")

  ##' combine i and j returns a Genome_intervals_stranded object
  c( i, j )

  ##' combine a not-stranded and a stranded returns a not-stranded object
  c( as(i, "Genome_intervals"), j )

Run the code above in your browser using DataLab