R/scales_flowJo_biexp.R

Defines functions scale_y_flowJo_biexp scale_x_flowJo_biexp

Documented in scale_x_flowJo_biexp scale_y_flowJo_biexp

#' flowJo biexponential scale
#' 
#' @param ... common continuous scale parameters passed to 'continuous_scale' (not used currently)
#' @param maxValue,widthBasis,pos,neg see 'help(flowJoTrans')
#' @param equal.space whether to display the breaks in equal.space format
#' @return ScaleContinuous object
#' @importFrom flowWorkspace flowJo_biexp_trans
#' @examples 
#' data(GvHD)
#' fr <- GvHD[[1]]
#' p <- ggcyto(fr, aes(x = `FL1-H`)) + geom_density()
#' #display at raw scale
#' p 
#' #display at transformed scale
#' p + scale_x_flowJo_biexp(maxValue = 1e4, widthBasis = 0)
#' @export
scale_x_flowJo_biexp <- function(..., maxValue = 262144, widthBasis = -10, pos = 4.5, neg = 0, equal.space = FALSE){
  myTrans <- flowJo_biexp_trans(maxValue = maxValue, widthBasis = widthBasis, pos = pos, neg = neg, equal.space = equal.space)
  scale_x_continuous(..., trans = myTrans)
}

#' @rdname scale_x_flowJo_biexp
#' @export
scale_y_flowJo_biexp <- function(..., maxValue = 262144, widthBasis = -10, pos = 4.5, neg = 0, equal.space = FALSE){
  myTrans <- flowJo_biexp_trans(maxValue = maxValue, widthBasis = widthBasis, pos = pos, neg = neg, equal.space = equal.space)
  scale_y_continuous(..., trans = myTrans)
}

Try the ggcyto package in your browser

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

ggcyto documentation built on May 2, 2018, 4:09 a.m.