R/methods-AlignedDataFrame.R

Defines functions AlignedDataFrame

Documented in AlignedDataFrame

AlignedDataFrame <- function(data, metadata, nrow=nrow(data)) {
    if (missing(data)) {
        data <- data.frame(rep(0L, nrow))[,FALSE]
        metadata <- data.frame(labelDescription=character(0))
    }
    new("AlignedDataFrame", data=data, varMetadata=metadata)
}

setMethod(append, c("AlignedDataFrame", "AlignedDataFrame"),
    function(x, values, after=length(x))
{
    if (!identical(varMetadata(x), varMetadata(values))) {
        .throw(SRError("IncompatibleTypes",
                       "'%s' and '%s' have different '%s'",
                       "x", "values", "varMetadata"))
    }
    new(class(x), data=rbind(pData(x), pData(values)),
        varMetadata=varMetadata(x))
})

Try the ShortRead package in your browser

Any scripts or data that you put into this service are public.

ShortRead documentation built on Nov. 8, 2020, 8:02 p.m.