| 1 |
\name{c} |
| 2 |
|
| 3 |
\alias{c} |
| 4 |
\alias{c.Intervals} |
| 5 |
\alias{c.Intervals_full} |
| 6 |
|
| 7 |
\title{Combine different interval matrix objects} |
| 8 |
|
| 9 |
\description{ |
| 10 |
S3 methods for concatenating sets of intervals into a single set. |
| 11 |
} |
| 12 |
|
| 13 |
\usage{ |
| 14 |
\S3method{c}{Intervals}(...) |
| 15 |
\S3method{c}{Intervals_full}(...) |
| 16 |
} |
| 17 |
|
| 18 |
\arguments{ |
| 19 |
|
| 20 |
\item{...}{\code{"Intervals"} or \code{"Intervals_full"} objects.} |
| 21 |
|
| 22 |
} |
| 23 |
|
| 24 |
\details{ |
| 25 |
|
| 26 |
All objects are expected to have the same value in the \code{type} |
| 27 |
slot. If the \code{closed} slots differ for |
| 28 |
\code{"\linkS4class{Intervals}"} objects and \code{type == "Z"}, the |
| 29 |
objects will be adjusted to have \code{closed} values matching that of |
| 30 |
\code{x}; if \code{type == "R"}, however, then all objects must first |
| 31 |
be coerced to class \code{"\linkS4class{Intervals_full}"}, with a |
| 32 |
warning. This coercion also occurs when a mixture of object types is |
| 33 |
passed in. A \code{NULL} in any argument is ignored. |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
\value{ |
| 38 |
A single \code{"\linkS4class{Intervals}"} or |
| 39 |
\code{"\linkS4class{Intervals_full}"} object. Input objects are |
| 40 |
concatenated in their order of appearance in the the argument list. |
| 41 |
|
| 42 |
If any input argument is not a set of intervals, \code{list(...)} is |
| 43 |
returned instead. |
| 44 |
} |
| 45 |
|
| 46 |
\note{ |
| 47 |
These methods will be converted to S4 once the necessary dispatch on |
| 48 |
\code{...} is supported. |
| 49 |
} |
| 50 |
|
| 51 |
\examples{ |
| 52 |
f1 <- Intervals( 1:2, type = "Z" ) |
| 53 |
g1 <- open_intervals( f1 + 5 ) |
| 54 |
|
| 55 |
# Combining Intervals objects over Z may require closure adjustment |
| 56 |
c( f1, g1 ) |
| 57 |
|
| 58 |
f2 <- f1; g2 <- g1 |
| 59 |
type( f2 ) <- type( g2 ) <- "R" |
| 60 |
|
| 61 |
# Combine Intervals objects over R which have different closure requires |
| 62 |
# coercion |
| 63 |
|
| 64 |
h <- c( f2, g2 ) |
| 65 |
|
| 66 |
# Coercion for mixed combinations as well |
| 67 |
c( h, g2 + 10 ) |
| 68 |
|
| 69 |
\dontrun{ |
| 70 |
# Combining different types is not permitted |
| 71 |
c( h, g1 + 10 ) |
| 72 |
} |
| 73 |
|
| 74 |
} |