R/Extract.colored.R

##' Index a colored vector
##'
##' @param x A colored factor
##' @param ... Unused
##' @return A colored factor
##' @method [ colored
##' @author David C. Norris
##' @rdname Extract.colored
##' @seealso \code{\link{colored}}
##' @export
`[.colored` <- function(x, ...){
  y <- NextMethod("[")
  attr(y,'colors') <- attr(x,'colors')
  y
}

Try the VizOR package in your browser

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

VizOR documentation built on May 30, 2017, 5:29 a.m.