Makes a function you can use to specify the location of each group independently.
gapply.fun <- structure(function # Direct label groups independently ### Makes a function you can use to specify the location of each group ### independently. (expr ### Expression that takes a subset of the d data frame, with data from ### only a single group, and returns the direct label position. ){ foo <- substitute(expr) f <- function(d,...)eval(foo) src <- paste("gapply.fun(",paste(deparse(foo),collapse="n"),")",sep="") pf <- structure(function(d,...)gapply(d,f,...),"source"=src) pf ### A Positioning Function. },ex=function(){ complicated <- list(dl.trans(x=x+10), gapply.fun(d[-2,]), rot=c(30,180)) library(lattice) direct.label(dotplot(VADeaths,type="o"),complicated,TRUE) })
Please contact Toby Dylan Hocking if you are using directlabels or have ideas to contribute, thanks! |
Documentation website generated from source code version 2021.2.24 (git revision bb6db07 Mon, 14 Jun 2021 22:38:45 +0530) using inlinedocs. |
validate |