R/aes.R

Defines functions parseArgsForNonAes parseArgsForAes

Documented in parseArgsForAes parseArgsForNonAes

parseArgsForAes <- function(args){
    res <- if ("mapping" %in% names(args)) {
               args[["mapping"]]
           } else {
               Find(function(x) {
                   class(x) == "uneval"
               }, args)
           }

    if (is.null(res))
        res <- structure(list(), class="uneval")
    
  idx <- ggplot2_is_calculated_aes(res)
  res[idx] <- ggplot2_strip_dots(res[idx])
  res
}

parseArgsForNonAes <- function(args){
  lst <- unlist(lapply(args, function(x) class(eval(x, parent.frame())) != "uneval"))
  args[lst]
}
Bioconductor-mirror/biovizBase documentation built on June 1, 2017, 5:21 a.m.