SCM

R Development Page

directlabels log file (check_x86_64_linux)

Mon Jun 28 17:08:50 2021: Checking package directlabels (SVN revision 688) ...
* using log directory ‘/srv/rf/building/build_2021-06-28-17-07/RF_PKG_CHECK/PKGS/directlabels.Rcheck’
* using R version 4.1.0 Patched (2021-06-26 r80566)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--as-cran’
* checking for file ‘directlabels/DESCRIPTION’ ... OK
* this is package ‘directlabels’ version ‘2020.6.17’
* checking CRAN incoming feasibility ... WARNING
Maintainer: ‘Toby Dylan Hocking ’

Insufficient package version (submitted: 2020.6.17, existing: 2021.1.13)
Version contains large components (2020.6.17)

Package has a VignetteBuilder field but no prebuilt vignette index.
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking serialization versions ... OK
* checking whether package ‘directlabels’ can be installed ... [3s/3s] OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... NOTE
Non-standard file/directory found at top level:
  ‘etc’
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [5s/5s] OK
* checking Rd files ... [0s/0s] OK
* checking Rd metadata ... WARNING
Rd files with duplicated alias 'directlabels':
  ‘direct.label.Rd’ ‘directlabels-package.Rd’
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... WARNING
Undocumented code objects:
  ‘bottom.points’ ‘bottom.polygons’ ‘left.points’ ‘left.polygons’
  ‘pkgFun’ ‘reduce.cex’ ‘reduce.cex.tb’ ‘right.points’ ‘right.polygons’
  ‘top.polygons’
All user-level objects in a package should have documentation entries.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking LazyData ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in Makefiles ... OK
* checking for GNU extensions in Makefiles ... OK
* checking include directives in Makefiles ... OK
* checking examples ... [4s/4s] ERROR
Running examples in ‘directlabels-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: direct.label
> ### Title: Direct labels for color decoding
> ### Aliases: direct.label directlabels
> 
> ### ** Examples
> 
> if(require(ggplot2)){
+   ## Add direct labels to a ggplot2 scatterplot, making sure that each
+   ## label is close to its point cloud, and doesn't overlap points or
+   ## other labels.
+   scatter <- qplot(jitter(hwy),jitter(cty),data=mpg,colour=class,
+                    main="Fuel efficiency depends on car size")
+   print(direct.label(scatter))
+ }
Loading required package: ggplot2
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[1]> 
debug: attr(d, "orig.data") <- d
Browse[2]> ## direct labels for lineplots that do not overlap and do not go off
Browse[2]> ## the plot.
Browse[2]> library(nlme)

Attaching package: ‘nlme’

The following object is masked from ‘package:directlabels’:

    gapply

Browse[2]> library(lattice)
Browse[2]> oldopt <- lattice.options(panel.error=NULL)
Browse[2]> ratplot <-
+   xyplot(weight~Time|Diet,BodyWeight,groups=Rat,type='l',layout=c(3,1))
Browse[2]> ## Using the default Positioning Method (maxvar.qp), the labels are
Browse[2]> ## placed on the side which is most spread out, so in multipanel
Browse[2]> ## plots they sometimes end up on different sides.
Browse[2]> print(direct.label(ratplot))
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[3]> ## To put them on the same side, just manually specify the
Browse[3]> ## Positioning Method.
Browse[3]> print(direct.label(ratplot,"last.qp")) 
Error in direct.label(ratplot, "last.qp") : object 'ratplot' not found
Calls: print ... drawDetails.dlgrob -> apply.method -> print -> direct.label
Browse[3]> 
debug: attr(d, "orig.data") <- d
Browse[4]> lattice.options(oldopt)
Error in lattice.options(oldopt) : object 'oldopt' not found
Calls: print ... drawDetails.dlgrob -> apply.method -> lattice.options
Browse[4]> 
debug: check.for.columns(d, columns.to.check)
Browse[4]> 
debug: if (!is.list(method)) method <- list(method)
Browse[4]> 
debug: method <- list(method)
Browse[4]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[4]> base::cat("direct.label", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[4]> cleanEx()

detaching ‘package:lattice’, ‘package:nlme’, ‘package:ggplot2’

Browse[4]> nameEx("dl.combine")
Browse[4]> ### * dl.combine
Browse[4]> 
debug: isconst <- function() {
    m.var <- names(method)[1]
    !(is.null(m.var) || m.var == "")
}
Browse[4]> flush(stderr()); flush(stdout())
Browse[4]> 
debug: islist <- function() is.list(method[[1]])
Browse[4]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[4]> ### Name: dl.combine
Browse[4]> ### Title: Combine output of several methods
Browse[4]> ### Aliases: dl.combine
Browse[4]> 
debug: isref <- function() (!isconst()) && is.character(method[[1]])
Browse[4]> ### ** Examples
Browse[4]> 
debug: while (length(method)) {
    if (debug) 
        print(method[1])
    while (islist() || isref()) {
        if (islist()) {
            method <- c(method[[1]], method[-1])
        }
        else {
            if (length(method[[1]]) > 1) {
                warning("using first element of character vector")
                method[[1]] <- method[[1]][1]
            }
            method <- c(get(method[[1]]), method[-1])
        }
    }
    if (isconst()) 
        d[[names(method)[1]]] <- method[[1]]
    else {
        old <- d
        group.dfs <- split(d, d$groups)
        group.specific <- lapply(group.dfs, only.unique.vals)
        to.restore <- Reduce(intersect, lapply(group.specific, 
            names))
        d <- method[[1]](d, debug = debug, ...)
        if (length(d) == 0) {
            return(data.frame())
        }
        else {
            check.for.columns(d, columns.to.check)
            if ("groups" %in% names(d)) {
                to.restore <- to.restore[!to.restore %in% names(d)]
                for (N in to.restore) {
                  d[[N]] <- NA
                  group.vec <- paste(unique(d$groups))
                  for (g in group.vec) {
                    old.val <- group.specific[[g]][, N]
                    if (is.factor(old.val)) 
                      old.val <- paste(old.val)
                    d[d$groups == g, N] <- old.val
                  }
                }
            }
        }
        attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) 
            old
        else attr(old, "orig.data")
    }
    if (debug) {
        print(d)
    }
    method <- method[-1]
}
Browse[4]> 
debug: if (debug) print(method[1])
Browse[4]> ## Simple example: label the start and endpoints
Browse[4]> library(nlme)

Attaching package: ‘nlme’

The following object is masked from ‘package:directlabels’:

    gapply

Browse[4]> library(lattice)
Browse[4]> ratplot <- xyplot(
+   weight~Time|Diet,BodyWeight,groups=Rat,type='l',layout=c(3,1))
Browse[4]> both <- dl.combine("first.points","last.points")
Browse[4]> rat.both <- direct.label(ratplot,"both")
Browse[4]> print(rat.both)
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[5]> 
debug: attr(d, "orig.data") <- d
Browse[6]> ## same as repeated call to direct.label:
Browse[6]> rat.repeated <-
+   direct.label(direct.label(ratplot,"last.points"),"first.points")
Error in direct.label(ratplot, "last.points") : 
  object 'ratplot' not found
Calls: print ... drawDetails.dlgrob -> apply.method -> direct.label -> direct.label
Browse[6]> print(rat.repeated)
Error in print(rat.repeated) : object 'rat.repeated' not found
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[6]> 
debug: check.for.columns(d, columns.to.check)
Browse[6]> ## same with ggplot2:
Browse[6]> if(require(ggplot2)){
+   rp2 <- qplot(
+     Time,weight,data=BodyWeight,geom="line",facets=.~Diet,colour=Rat)
+   print(direct.label(direct.label(rp2,"last.points"),"first.points"))
+   print(direct.label(rp2,"both"))
+ }
Loading required package: ggplot2
debug: rp2 <- qplot(Time, weight, data = BodyWeight, geom = "line", 
    facets = . ~ Diet, colour = Rat)
Browse[7]> 
debug: print(direct.label(direct.label(rp2, "last.points"), "first.points"))
Browse[7]> ## more complex example: first here is a function for computing the
Browse[7]> ## lasso path.
Browse[7]> mylars <- function
+ ## Least angle regression algorithm for calculating lasso solutions.
+ (x,
+  ## Matrix of predictor variables.
+  y,
+  ## Vector of responses.
+  epsilon=1e-6
+  ## If correlation < epsilon, we are done.
+  ){
+   xscale <- scale(x) # need to work with standardized variables
+   b <- rep(0,ncol(x))# coef vector starts at 0
+   names(b) <- colnames(x)
+   ycor <- apply(xscale,2,function(xj)sum(xj*y))
+   j <- which.max(ycor) # variables in active set, starts with most correlated
+   alpha.total <- 0
+   out <- data.frame()
+   while(1){## lar loop
+     xak <- xscale[,j] # current variables
+     r <- y-xscale%*%b # current residual
+     ## direction of parameter evolution
+     delta <- solve(t(xak)%*%xak)%*%t(xak)%*%r
+     ## Current correlations (actually dot product)
+     intercept <- apply(xscale,2,function(xk)sum(r*xk))
+     ## current rate of change of correlations
+     z <- xak%*%delta
+     slope <- apply(xscale,2,function(xk)-sum(z*xk))
+     ## store current values of parameters and correlation
+     out <- rbind(out,data.frame(variable=colnames(x),
+                                 coef=b,
+                                 corr=abs(intercept),
+                                 alpha=alpha.total,
+                                 arclength=sum(abs(b)),
+                                 coef.unscaled=b/attr(xscale,"scaled:scale")))
+     if(sum(abs(intercept)) < epsilon)#corr==0 so we are done
+       return(transform(out,s=arclength/max(arclength)))
+     ## If there are more variables we can enter into the regression,
+     ## then see which one will cross the highest correlation line
+     ## first, and record the alpha value of where the lines cross.
+     d <- data.frame(slope,intercept)
+     d[d$intercept<0,] <- d[d$intercept<0,]*-1
+     d0 <- data.frame(d[j[1],])# highest correlation line
+     d2 <- data.frame(rbind(d,-d),variable=names(slope))#reflected lines
+     ## Calculation of alpha for where lines cross for each variable
+     d2$alpha <- (d0$intercept-d2$intercept)/(d2$slope-d0$slope)
+     subd <- d2[(!d2$variable%in%colnames(x)[j])&d2$alpha>epsilon,]
+     subd <- subd[which.min(subd$alpha),]
+     nextvar <- subd$variable
+     alpha <- if(nrow(subd))subd$alpha else 1
+     ## If one of the coefficients would hit 0 at a smaller alpha
+     ## value, take it out of the regression and continue.
+     hit0 <- xor(b[j]>0,delta>0)&b[j]!=0
+     alpha0 <- -b[j][hit0]/delta[hit0]
+     takeout <- length(alpha0)&&min(alpha0) < alpha
+     if(takeout){
+       i <- which.min(alpha0)
+       alpha <- alpha0[i]
+     }
+     b[j] <- b[j]+alpha*delta ## evolve parameters
+     alpha.total <- alpha.total+alpha
+     ## add or remove a variable from the active set
+     j <- if(takeout)j[j!=which(names(i)==colnames(x))]
+          else c(j,which(nextvar==colnames(x)))
+   }
+ }
Browse[7]> 
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[7]> ## Calculate lasso path, plot labels at two points: (1) where the
Browse[7]> ## variable enters the path, and (2) at the end of the path.
Browse[7]> if(require(lars)){
+   data(diabetes,envir=environment())
+   dres <- with(diabetes,mylars(x,y))
+   P <- xyplot(coef~arclength,dres,groups=variable,type="l")
+   mylasso <- dl.combine("lasso.labels", "last.qp")
+   plot(direct.label(P,"mylasso"))
+ }
Loading required package: lars
Loaded lars 1.2

debug: data(diabetes, envir = environment())
Browse[9]> 
debug: dres <- with(diabetes, mylars(x, y))
Browse[9]> 
Error in mylars(x, y) : could not find function "mylars"
Calls: print ... apply.method -> with -> with.default -> eval -> eval
Browse[7]> 
debug: attr(d, "orig.data") <- d
Browse[8]> 
debug: check.for.columns(d, columns.to.check)
Browse[8]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[8]> base::cat("dl.combine", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[8]> cleanEx()

detaching ‘package:lars’, ‘package:ggplot2’, ‘package:lattice’,
  ‘package:nlme’

Browse[8]> nameEx("dl.move")
Browse[8]> ### * dl.move
Browse[8]> 
debug: if (!is.list(method)) method <- list(method)
Browse[8]> flush(stderr()); flush(stdout())
Browse[8]> 
debug: method <- list(method)
Browse[8]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[8]> ### Name: dl.move
Browse[8]> ### Title: Manually move a direct label
Browse[8]> ### Aliases: dl.move
Browse[8]> 
debug: isconst <- function() {
    m.var <- names(method)[1]
    !(is.null(m.var) || m.var == "")
}
Browse[8]> ### ** Examples
Browse[8]> 
debug: islist <- function() is.list(method[[1]])
Browse[8]> if(require(ggplot2)){
+   library(lattice)
+   scatter <- xyplot(jitter(cty)~jitter(hwy),mpg,groups=class,aspect=1)
+   dlcompare(list(scatter),
+             list("extreme.grid",
+                  `+dl.move`=list(extreme.grid,dl.move("suv",15,15))))
+   p <- qplot(log10(gamma),rate,data=svmtrain,group=data,colour=data,
+              geom="line",facets=replicate~nu)
+   adjust.kif <- dl.move("KIF11",-0.9,hjust=1,vjust=1)
+   dlcompare(list(p+xlim(-8,7)),
+             list("last.points",
+                  `+dl.move`=list(last.points,adjust.kif)))
+ }
Loading required package: ggplot2
debug: library(lattice)
Browse[9]> 
debug: scatter <- xyplot(jitter(cty) ~ jitter(hwy), mpg, groups = class, 
    aspect = 1)
Browse[9]> 
debug: dlcompare(list(scatter), list("extreme.grid", `+dl.move` = list(extreme.grid, 
    dl.move("suv", 15, 15))))
Browse[9]> 
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[9]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[9]> base::cat("dl.move", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[9]> cleanEx()

detaching ‘package:lattice’, ‘package:ggplot2’

Browse[9]> nameEx("dl.trans")
Browse[9]> ### * dl.trans
Browse[9]> 
debug: attr(d, "orig.data") <- d
Browse[10]> flush(stderr()); flush(stdout())
Browse[10]> 
debug: check.for.columns(d, columns.to.check)
Browse[10]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[10]> ### Name: dl.trans
Browse[10]> ### Title: Direct label data transform
Browse[10]> ### Aliases: dl.trans
Browse[10]> 
debug: if (!is.list(method)) method <- list(method)
Browse[10]> ### ** Examples
Browse[10]> 
debug: method <- list(method)
Browse[10]> complicated <- list(dl.trans(x=x+10),
+                     gapply.fun(d[-2,]),
+                     rot=c(30,180))
Browse[10]> library(lattice)
Browse[10]> direct.label(dotplot(VADeaths,type="o"),complicated,TRUE)
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[11]> 
debug: attr(d, "orig.data") <- d
Browse[12]> 
debug: check.for.columns(d, columns.to.check)
Browse[12]> 
debug: if (!is.list(method)) method <- list(method)
Browse[12]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[12]> base::cat("dl.trans", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[12]> cleanEx()

detaching ‘package:lattice’

Browse[12]> nameEx("dlcompare")
Browse[12]> ### * dlcompare
Browse[12]> 
debug: isconst <- function() {
    m.var <- names(method)[1]
    !(is.null(m.var) || m.var == "")
}
Browse[12]> flush(stderr()); flush(stdout())
Browse[12]> 
debug: islist <- function() is.list(method[[1]])
Browse[12]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[12]> ### Name: dlcompare
Browse[12]> ### Title: Direct label comparison plot
Browse[12]> ### Aliases: dlcompare
Browse[12]> 
debug: isref <- function() (!isconst()) && is.character(method[[1]])
Browse[12]> ### ** Examples
Browse[12]> 
debug: while (length(method)) {
    if (debug) 
        print(method[1])
    while (islist() || isref()) {
        if (islist()) {
            method <- c(method[[1]], method[-1])
        }
        else {
            if (length(method[[1]]) > 1) {
                warning("using first element of character vector")
                method[[1]] <- method[[1]][1]
            }
            method <- c(get(method[[1]]), method[-1])
        }
    }
    if (isconst()) 
        d[[names(method)[1]]] <- method[[1]]
    else {
        old <- d
        group.dfs <- split(d, d$groups)
        group.specific <- lapply(group.dfs, only.unique.vals)
        to.restore <- Reduce(intersect, lapply(group.specific, 
            names))
        d <- method[[1]](d, debug = debug, ...)
        if (length(d) == 0) {
            return(data.frame())
        }
        else {
            check.for.columns(d, columns.to.check)
            if ("groups" %in% names(d)) {
                to.restore <- to.restore[!to.restore %in% names(d)]
                for (N in to.restore) {
                  d[[N]] <- NA
                  group.vec <- paste(unique(d$groups))
                  for (g in group.vec) {
                    old.val <- group.specific[[g]][, N]
                    if (is.factor(old.val)) 
                      old.val <- paste(old.val)
                    d[d$groups == g, N] <- old.val
                  }
                }
            }
        }
        attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) 
            old
        else attr(old, "orig.data")
    }
    if (debug) {
        print(d)
    }
    method <- method[-1]
}
Browse[12]> library(lattice)
Browse[12]> oldopt <- lattice.options(panel.error=NULL)
Browse[12]> 
debug: if (debug) print(method[1])
Browse[12]> ## Compare two plots of the same data using lattice and ggplot2.
Browse[12]> deaths.by.sex <- list(male=mdeaths, female=fdeaths)
Browse[12]> deaths.list <- list()
Browse[12]> for(sex in names(deaths.by.sex)){
+   deaths.ts <- deaths.by.sex[[sex]]
+   deaths.list[[sex]] <-
+     data.frame(year=as.numeric(time(deaths.ts)),
+                sex,
+                deaths=as.integer(deaths.ts))
+ }
debug: deaths.ts <- deaths.by.sex[[sex]]
Browse[13]> deaths <- do.call(rbind, deaths.list)
Browse[13]> death.plot.list <-
+   list(lattice=xyplot(deaths~year,deaths,groups=sex,type="l"))
Error in eval(varsRHS[[1]], data, env) : object 'year' not found
Calls: print ... xyplot.formula -> latticeParseFormula -> eval -> eval
Browse[13]> if(require(ggplot2)){
+   death.plot.list$ggplot2 <- 
+     qplot(year,deaths,data=deaths,colour=sex,geom="line")
+ }
Loading required package: ggplot2
debug: death.plot.list$ggplot2 <- qplot(year, deaths, data = deaths, 
    colour = sex, geom = "line")
Browse[14]> 
Error in death.plot.list$ggplot2 <- qplot(year, deaths, data = deaths,  : 
  object 'death.plot.list' not found
Calls: print ... drawGrob -> drawDetails -> drawDetails.dlgrob -> apply.method
Browse[13]> if(names(dev.cur())!="postscript"){##to avoid error on pkg check.
+   ## Use some exotic labeling options with different rotation, font
+   ## face, family, and alpha transparency.
+   exotic <- list("last.points",
+                  rot=c(0,180),
+                  fontsize=c(10,20),
+                  fontface=c("bold","italic"),
+                  fontfamily=c("mono","serif"),
+                  alpha=c(0.25,1))
+   dlcompare(death.plot.list, list(exotic))
+ }
debug: exotic <- list("last.points", rot = c(0, 180), fontsize = c(10, 
    20), fontface = c("bold", "italic"), fontfamily = c("mono", 
    "serif"), alpha = c(0.25, 1))
Browse[14]>   
Browse[14]> lattice.options(oldopt)
Browse[14]> 
debug: dlcompare(death.plot.list, list(exotic))
Browse[14]> ## Compare a legend with direct labels on the same plot.
Browse[14]> library(nlme)

Attaching package: ‘nlme’

The following object is masked from ‘package:directlabels’:

    gapply

Browse[14]> if(require(ggplot2)){
+   ggrat <- qplot(Time,weight,data=BodyWeight,
+                  colour=Rat,geom="line",facets=.~Diet)
+   pfuns <- list("legend","direct labels"="last.qp")
+   dlcompare(list(ggrat),pfuns,rects=FALSE,row.items="posfuns")
+ }
debug: ggrat <- qplot(Time, weight, data = BodyWeight, colour = Rat, 
    geom = "line", facets = . ~ Diet)
Browse[15]> 
debug: pfuns <- list("legend", `direct labels` = "last.qp")
Browse[15]> 
debug: dlcompare(list(ggrat), pfuns, rects = FALSE, row.items = "posfuns")
Browse[15]> 
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[15]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[15]> base::cat("dlcompare", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[15]> cleanEx()

detaching ‘package:nlme’, ‘package:ggplot2’, ‘package:lattice’

Browse[15]> nameEx("gapply.fun")
Browse[15]> ### * gapply.fun
Browse[15]> 
debug: attr(d, "orig.data") <- d
Browse[16]> flush(stderr()); flush(stdout())
Browse[16]> 
debug: check.for.columns(d, columns.to.check)
Browse[16]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[16]> ### Name: gapply.fun
Browse[16]> ### Title: Direct label groups independently
Browse[16]> ### Aliases: gapply.fun
Browse[16]> 
debug: if (!is.list(method)) method <- list(method)
Browse[16]> ### ** Examples
Browse[16]> 
debug: method <- list(method)
Browse[16]> complicated <- list(dl.trans(x=x+10),
+                     gapply.fun(d[-2,]),
+                     rot=c(30,180))
Browse[16]> library(lattice)
Browse[16]> direct.label(dotplot(VADeaths,type="o"),complicated,TRUE)
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[17]> 
debug: attr(d, "orig.data") <- d
Browse[18]> 
debug: check.for.columns(d, columns.to.check)
Browse[18]> 
debug: if (!is.list(method)) method <- list(method)
Browse[18]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[18]> base::cat("gapply.fun", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[18]> cleanEx()

detaching ‘package:lattice’

Browse[18]> nameEx("geom_dl")
Browse[18]> ### * geom_dl
Browse[18]> 
debug: isconst <- function() {
    m.var <- names(method)[1]
    !(is.null(m.var) || m.var == "")
}
Browse[18]> flush(stderr()); flush(stdout())
Browse[18]> 
debug: islist <- function() is.list(method[[1]])
Browse[18]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[18]> ### Name: geom_dl
Browse[18]> ### Title: geom dl
Browse[18]> ### Aliases: geom_dl
Browse[18]> 
debug: isref <- function() (!isconst()) && is.character(method[[1]])
Browse[18]> ### ** Examples
Browse[18]> 
debug: while (length(method)) {
    if (debug) 
        print(method[1])
    while (islist() || isref()) {
        if (islist()) {
            method <- c(method[[1]], method[-1])
        }
        else {
            if (length(method[[1]]) > 1) {
                warning("using first element of character vector")
                method[[1]] <- method[[1]][1]
            }
            method <- c(get(method[[1]]), method[-1])
        }
    }
    if (isconst()) 
        d[[names(method)[1]]] <- method[[1]]
    else {
        old <- d
        group.dfs <- split(d, d$groups)
        group.specific <- lapply(group.dfs, only.unique.vals)
        to.restore <- Reduce(intersect, lapply(group.specific, 
            names))
        d <- method[[1]](d, debug = debug, ...)
        if (length(d) == 0) {
            return(data.frame())
        }
        else {
            check.for.columns(d, columns.to.check)
            if ("groups" %in% names(d)) {
                to.restore <- to.restore[!to.restore %in% names(d)]
                for (N in to.restore) {
                  d[[N]] <- NA
                  group.vec <- paste(unique(d$groups))
                  for (g in group.vec) {
                    old.val <- group.specific[[g]][, N]
                    if (is.factor(old.val)) 
                      old.val <- paste(old.val)
                    d[d$groups == g, N] <- old.val
                  }
                }
            }
        }
        attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) 
            old
        else attr(old, "orig.data")
    }
    if (debug) {
        print(d)
    }
    method <- method[-1]
}
Browse[18]> if(require(ggplot2)){
+   vad <- as.data.frame.table(VADeaths)
+   names(vad) <- c("age","demographic","deaths")
+   ## color + legend
+   leg <- ggplot(vad,aes(deaths,age,colour=demographic))+
+     geom_line(aes(group=demographic))+
+     xlim(8,80)
+   print(direct.label(leg,list("last.points",rot=30)))
+   ## this is what direct.label is doing internally:
+   labeled <- leg+
+     geom_dl(aes(label=demographic), method=list("last.points",rot=30))+
+     scale_colour_discrete(guide="none")
+   print(labeled)
+   ## no color, just direct labels!
+   p <- ggplot(vad,aes(deaths,age))+
+     geom_line(aes(group=demographic))+
+     geom_dl(aes(label=demographic),method="top.qp")
+   print(p)
+   ## add color:
+   p+aes(colour=demographic)+
+     scale_colour_discrete(guide="none")
+   ## add linetype:
+   p+aes(linetype=demographic)+
+     scale_linetype(guide="none")
+   ## no color, just direct labels
+   library(nlme)
+   bwbase <- ggplot(BodyWeight,aes(Time,weight,label=Rat))+
+     geom_line(aes(group=Rat))+
+     facet_grid(.~Diet)
+   bw <- bwbase+geom_dl(method="last.qp")
+   print(bw)
+   ## add some more direct labels
+   bw2 <- bw+geom_dl(method="first.qp")
+   print(bw2)
+   ## add color
+   colored <- bw2+aes(colour=Rat)+
+     scale_colour_discrete(guide="none")
+   print(colored)
+   ## or just use direct.label if you use color:
+   direct.label(bwbase+aes(colour=Rat),dl.combine("first.qp","last.qp"))
+ 
+   ## iris data example
+   giris <- ggplot(iris,aes(Petal.Length,Sepal.Length))+
+     geom_point(aes(shape=Species))
+   giris.labeled <- giris+
+     geom_dl(aes(label=Species),method="smart.grid")+
+     scale_shape_manual(values=c(setosa=1,virginica=6,versicolor=3),
+                        guide="none")
+   ##png("~/R/directlabels/www/scatter-bw-ggplot2.png",h=503,w=503)
+   print(giris.labeled)
+   ##dev.off()
+ }
Loading required package: ggplot2
debug: vad <- as.data.frame.table(VADeaths)
Browse[19]> 
debug: names(vad) <- c("age", "demographic", "deaths")
Browse[19]> 
debug: leg <- ggplot(vad, aes(deaths, age, colour = demographic)) + 
    geom_line(aes(group = demographic)) + xlim(8, 80)
Browse[19]> 
debug: print(direct.label(leg, list("last.points", rot = 30)))
Browse[19]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[19]> base::cat("geom_dl", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[19]> cleanEx()

detaching ‘package:ggplot2’

Browse[19]> nameEx("iris.l1.cluster")
Browse[19]> ### * iris.l1.cluster
Browse[19]> 
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[19]> flush(stderr()); flush(stdout())
Browse[19]> 
debug: attr(d, "orig.data") <- d
Browse[20]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[20]> ### Name: iris.l1.cluster
Browse[20]> ### Title: Clustering of the iris data with the l1 clusterpath
Browse[20]> ### Aliases: iris.l1.cluster
Browse[20]> ### Keywords: datasets
Browse[20]> 
debug: check.for.columns(d, columns.to.check)
Browse[20]> ### ** Examples
Browse[20]> 
debug: if (!is.list(method)) method <- list(method)
Browse[20]> data(iris.l1.cluster,package="directlabels")
Browse[20]> iris.l1.cluster$y <- iris.l1.cluster$alpha
Browse[20]> if(require(ggplot2)){
+   p <- ggplot(iris.l1.cluster,aes(lambda,y,group=row,colour=Species))+
+     geom_line(alpha=1/4)+
+     facet_grid(col~.)
+   p2 <- p+xlim(-0.0025,max(iris.l1.cluster$lambda))
+   print(direct.label(p2,list(first.points,get.means)))
+ }
Loading required package: ggplot2
debug: p <- ggplot(iris.l1.cluster, aes(lambda, y, group = row, colour = Species)) + 
    geom_line(alpha = 1/4) + facet_grid(col ~ .)
Browse[21]> 
debug: p2 <- p + xlim(-0.0025, max(iris.l1.cluster$lambda))
Browse[21]> 
debug: print(direct.label(p2, list(first.points, get.means)))
Browse[21]> 
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[21]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[21]> base::cat("iris.l1.cluster", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[21]> cleanEx()

detaching ‘package:ggplot2’

Browse[21]> nameEx("normal.l2.cluster")
Browse[21]> ### * normal.l2.cluster
Browse[21]> 
debug: attr(d, "orig.data") <- d
Browse[22]> flush(stderr()); flush(stdout())
Browse[22]> 
debug: check.for.columns(d, columns.to.check)
Browse[22]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[22]> ### Name: normal.l2.cluster
Browse[22]> ### Title: Clustering of some normal data in 2d with the l2 clusterpath
Browse[22]> ### Aliases: normal.l2.cluster
Browse[22]> ### Keywords: datasets
Browse[22]> 
debug: if (!is.list(method)) method <- list(method)
Browse[22]> ### ** Examples
Browse[22]> 
debug: isconst <- function() {
    m.var <- names(method)[1]
    !(is.null(m.var) || m.var == "")
}
Browse[22]> data(normal.l2.cluster)
Browse[22]> if(require(ggplot2)){
+   p <- ggplot(normal.l2.cluster$path,aes(x,y))+
+     geom_path(aes(group=row),colour="grey")+
+     geom_point(aes(size=lambda),colour="grey")+
+     geom_point(aes(colour=class),data=normal.l2.cluster$pts)+
+     coord_equal()
+   print(direct.label(p))
+ }
Loading required package: ggplot2
debug: p <- ggplot(normal.l2.cluster$path, aes(x, y)) + geom_path(aes(group = row), 
    colour = "grey") + geom_point(aes(size = lambda), colour = "grey") + 
    geom_point(aes(colour = class), data = normal.l2.cluster$pts) + 
    coord_equal()
Browse[23]> 
debug: print(direct.label(p))
Browse[23]> 
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[23]> 
debug: attr(d, "orig.data") <- d
Browse[24]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[24]> base::cat("normal.l2.cluster", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[24]> cleanEx()

detaching ‘package:ggplot2’

Browse[24]> nameEx("panel.superpose.dl")
Browse[24]> ### * panel.superpose.dl
Browse[24]> 
debug: check.for.columns(d, columns.to.check)
Browse[24]> flush(stderr()); flush(stdout())
Browse[24]> 
debug: if (!is.list(method)) method <- list(method)
Browse[24]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[24]> ### Name: panel.superpose.dl
Browse[24]> ### Title: panel superpose dl
Browse[24]> ### Aliases: panel.superpose.dl
Browse[24]> 
debug: method <- list(method)
Browse[24]> ### ** Examples
Browse[24]> 
debug: isconst <- function() {
    m.var <- names(method)[1]
    !(is.null(m.var) || m.var == "")
}
Browse[24]> loci <- data.frame(ppp=c(rbeta(800,10,10),rbeta(100,0.15,1),rbeta(100,1,0.15)),
+                    type=factor(c(rep("NEU",800),rep("POS",100),rep("BAL",100))))
Browse[24]> ## 3 equivalent ways to make the same plot:
Browse[24]> library(lattice)
Browse[24]> print(direct.label( ## most user-friendly
+                    densityplot(~ppp,loci,groups=type,n=500)
+                    ))
Called from: apply.method(translator, d, ...)
Browse[25]> print(direct.label( ## exactly the same as above but with specific panel fns
+                    densityplot(~ppp,loci,groups=type,n=500,
+                                panel=lattice::panel.superpose,
+                                panel.groups="panel.densityplot")
+                    ))
Error in eval(substitute(groups), data, environment(formula)) : 
  object 'loci' not found
Calls: print ... direct.label -> densityplot -> densityplot.formula -> eval
Browse[25]> ## using panel.superpose.dl as the panel function automatically adds
Browse[25]> ## direct labels
Browse[25]> print(densityplot(~ppp,loci,groups=type,n=500,
+                   panel=panel.superpose.dl,panel.groups="panel.densityplot"))
Error in eval(substitute(groups), data, environment(formula)) : 
  object 'loci' not found
Calls: print ... print -> densityplot -> densityplot.formula -> eval
Browse[25]> 
debug: attr(d, "orig.data") <- d
Browse[26]> ## Exploring custom panel and panel.groups functions
Browse[26]> library(nlme)

Attaching package: ‘nlme’

The following object is masked from ‘package:directlabels’:

    gapply

Browse[26]> ## Say we want to use a simple linear model to explain rat body weight:
Browse[26]> fit <- lm(weight~Time+Diet+Rat,BodyWeight)
Browse[26]> bw <- BodyWeight
Browse[26]> bw$.fitted <- predict(fit,BodyWeight)
Warning in predict.lm(fit, BodyWeight) :
  prediction from a rank-deficient fit may be misleading
Browse[26]> ## lots of examples to come, all with these arguments:
Browse[26]> ratxy <- function(...){
+   xyplot(weight~Time|Diet,bw,groups=Rat,type="l",layout=c(3,1),...)
+ }
Browse[26]> ## No custom panel functions:
Browse[26]> ##regular <- ratxy(par.settings=simpleTheme(col=c("red","black")))
Browse[26]> regular <- ratxy()
Browse[26]> print(regular) ## normal lattice plot
Browse[26]> print(direct.label(regular)) ## with direct labels
Called from: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native)
Browse[27]> 
debug: attr(d, "orig.data") <- d
Browse[28]> ## The direct label panel function panel.superpose.dl can be used to
Browse[28]> ## display direct labels as well:
Browse[28]> print(ratxy(panel=panel.superpose.dl,panel.groups="panel.xyplot"))
Error in ratxy(panel = panel.superpose.dl, panel.groups = "panel.xyplot") : 
  could not find function "ratxy"
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> print(ratxy(panel=function(...)
+             panel.superpose.dl(panel.groups="panel.xyplot",...)))
Error in ratxy(panel = function(...) panel.superpose.dl(panel.groups = "panel.xyplot",  : 
  could not find function "ratxy"
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> 
debug: check.for.columns(d, columns.to.check)
Browse[28]> ## Not very user-friendly, since default label placement is
Browse[28]> ## impossible, but these should work:
Browse[28]> print(ratxy(panel=panel.superpose.dl,panel.groups=panel.xyplot,
+             method=first.points))
Error in ratxy(panel = panel.superpose.dl, panel.groups = panel.xyplot,  : 
  could not find function "ratxy"
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> print(ratxy(panel=function(...)
+             panel.superpose.dl(panel.groups=panel.xyplot,...),
+             method=first.points))
Error in ratxy(panel = function(...) panel.superpose.dl(panel.groups = panel.xyplot,  : 
  could not find function "ratxy"
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> 
debug: if (!is.list(method)) method <- list(method)
Browse[28]> ## Custom panel.groups functions:
Browse[28]> ## This panel.groups function will display the model fits:
Browse[28]> panel.model <- function(x,subscripts,col.line,...){
+   panel.xyplot(x=x,subscripts=subscripts,col.line=col.line,...)
+   llines(x,bw[subscripts,".fitted"],col=col.line,lty=2)
+ }
Browse[28]> pg <- ratxy(panel=lattice::panel.superpose,panel.groups=panel.model)
Error in ratxy(panel = lattice::panel.superpose, panel.groups = panel.model) : 
  could not find function "ratxy"
Calls: print ... drawGrob -> drawDetails -> drawDetails.dlgrob -> apply.method
Browse[28]> print(pg)
Error in print(pg) : object 'pg' not found
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> ## If you use panel.superpose.dl with a custom panel.groups function,
Browse[28]> ## you need to manually specify the Positioning Method, since the
Browse[28]> ## name of panel.groups is used to infer a default:
Browse[28]> print(direct.label(pg,method="first.qp"))
Error in direct.label(pg, method = "first.qp") : object 'pg' not found
Calls: print ... drawDetails.dlgrob -> apply.method -> print -> direct.label
Browse[28]> print(ratxy(panel=panel.superpose.dl,panel.groups="panel.model",
+             method="first.qp"))
Error in ratxy(panel = panel.superpose.dl, panel.groups = "panel.model",  : 
  could not find function "ratxy"
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> 
debug: method <- list(method)
Browse[28]> ## Custom panel function that draws a box around values:
Browse[28]> panel.line1 <- function(ps=lattice::panel.superpose){
+   function(y,...){
+     panel.abline(h=range(y))
+     ps(y=y,...)
+   }
+ }
Browse[28]> custom <- ratxy(panel=panel.line1())
Error in ratxy(panel = panel.line1()) : could not find function "ratxy"
Calls: print ... drawGrob -> drawDetails -> drawDetails.dlgrob -> apply.method
Browse[28]> print(custom)
Error in print(custom) : object 'custom' not found
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> print(direct.label(custom))
Error in direct.label(custom) : object 'custom' not found
Calls: print ... drawDetails.dlgrob -> apply.method -> print -> direct.label
Browse[28]> ## Alternate method, producing the same results, but using
Browse[28]> ## panel.superpose.dl in the panel function. This is useful for direct
Browse[28]> ## label plots where you use several datasets.
Browse[28]> print(ratxy(panel=panel.line1(panel.superpose.dl),panel.groups="panel.xyplot"))
Error in ratxy(panel = panel.line1(panel.superpose.dl), panel.groups = "panel.xyplot") : 
  could not find function "ratxy"
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> 
debug: isconst <- function() {
    m.var <- names(method)[1]
    !(is.null(m.var) || m.var == "")
}
Browse[28]> ## Lattice plot with custom panel and panel.groups functions:
Browse[28]> both <- ratxy(panel=panel.line1(),panel.groups="panel.model")
Error in ratxy(panel = panel.line1(), panel.groups = "panel.model") : 
  could not find function "ratxy"
Calls: print ... drawGrob -> drawDetails -> drawDetails.dlgrob -> apply.method
Browse[28]> print(both)
Error in print(both) : object 'both' not found
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> print(direct.label(both,method="first.qp"))
Error in direct.label(both, method = "first.qp") : 
  object 'both' not found
Calls: print ... drawDetails.dlgrob -> apply.method -> print -> direct.label
Browse[28]> print(ratxy(panel=panel.line1(panel.superpose.dl),
+             panel.groups=panel.model,method="first.qp"))
Error in ratxy(panel = panel.line1(panel.superpose.dl), panel.groups = panel.model,  : 
  could not find function "ratxy"
Calls: print ... drawDetails -> drawDetails.dlgrob -> apply.method -> print
Browse[28]> 
debug: islist <- function() is.list(method[[1]])
Browse[28]> 
debug: isref <- function() (!isconst()) && is.character(method[[1]])
Browse[28]> 
debug: while (length(method)) {
    if (debug) 
        print(method[1])
    while (islist() || isref()) {
        if (islist()) {
            method <- c(method[[1]], method[-1])
        }
        else {
            if (length(method[[1]]) > 1) {
                warning("using first element of character vector")
                method[[1]] <- method[[1]][1]
            }
            method <- c(get(method[[1]]), method[-1])
        }
    }
    if (isconst()) 
        d[[names(method)[1]]] <- method[[1]]
    else {
        old <- d
        group.dfs <- split(d, d$groups)
        group.specific <- lapply(group.dfs, only.unique.vals)
        to.restore <- Reduce(intersect, lapply(group.specific, 
            names))
        d <- method[[1]](d, debug = debug, ...)
        if (length(d) == 0) {
            return(data.frame())
        }
        else {
            check.for.columns(d, columns.to.check)
            if ("groups" %in% names(d)) {
                to.restore <- to.restore[!to.restore %in% names(d)]
                for (N in to.restore) {
                  d[[N]] <- NA
                  group.vec <- paste(unique(d$groups))
                  for (g in group.vec) {
                    old.val <- group.specific[[g]][, N]
                    if (is.factor(old.val)) 
                      old.val <- paste(old.val)
                    d[d$groups == g, N] <- old.val
                  }
                }
            }
        }
        attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) 
            old
        else attr(old, "orig.data")
    }
    if (debug) {
        print(d)
    }
    method <- method[-1]
}
Browse[28]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[28]> base::cat("panel.superpose.dl", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[28]> cleanEx()

detaching ‘package:nlme’, ‘package:lattice’

Browse[28]> nameEx("positioning.functions")
Browse[28]> ### * positioning.functions
Browse[28]> 
debug: if (debug) print(method[1])
Browse[28]> flush(stderr()); flush(stdout())
Browse[28]> 
debug: while (islist() || isref()) {
    if (islist()) {
        method <- c(method[[1]], method[-1])
    }
    else {
        if (length(method[[1]]) > 1) {
            warning("using first element of character vector")
            method[[1]] <- method[[1]][1]
        }
        method <- c(get(method[[1]]), method[-1])
    }
}
Browse[28]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[28]> ### Name: positioning.functions
Browse[28]> ### Title: Built-in Positioning Methods for direct label placement
Browse[28]> ### Aliases: positioning.functions positioning.methods
Browse[28]> 
debug: if (islist()) {
    method <- c(method[[1]], method[-1])
} else {
    if (length(method[[1]]) > 1) {
        warning("using first element of character vector")
        method[[1]] <- method[[1]][1]
    }
    method <- c(get(method[[1]]), method[-1])
}
Browse[28]> ### ** Examples
Browse[28]> 
debug: if (length(method[[1]]) > 1) {
    warning("using first element of character vector")
    method[[1]] <- method[[1]][1]
}
Browse[28]> ## Not run: 
Browse[28]> ##D ### contourplot Positioning Methods
Browse[28]> ##D for(p in list({
Browse[28]> ##D ## Example from help(contourplot)
Browse[28]> ##D require(stats)
Browse[28]> ##D require(lattice)
Browse[28]> ##D attach(environmental)
Browse[28]> ##D ozo.m <- loess((ozone^(1/3)) ~ wind * temperature * radiation,
Browse[28]> ##D                parametric = c("radiation", "wind"), span = 1, degree = 2)
Browse[28]> ##D w.marginal <- seq(min(wind), max(wind), length.out = 50)
Browse[28]> ##D t.marginal <- seq(min(temperature), max(temperature), length.out = 50)
Browse[28]> ##D r.marginal <- seq(min(radiation), max(radiation), length.out = 4)
Browse[28]> ##D wtr.marginal <- list(wind = w.marginal, temperature = t.marginal,
Browse[28]> ##D                      radiation = r.marginal)
Browse[28]> ##D grid <- expand.grid(wtr.marginal)
Browse[28]> ##D grid[, "fit"] <- c(predict(ozo.m, grid))
Browse[28]> ##D detach(environmental)
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D p <- ggplot(grid,aes(wind,temperature,z=fit))+
Browse[28]> ##D   stat_contour(aes(colour=..level..))+
Browse[28]> ##D   facet_wrap(~radiation)
Browse[28]> ##D 
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D ## example from help(stat_contour)
Browse[28]> ##D library(reshape2)
Browse[28]> ##D volcano3d <- melt(volcano)
Browse[28]> ##D names(volcano3d) <- c("x", "y", "z")
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D p <- ggplot(volcano3d, aes(x, y, z = z))+
Browse[28]> ##D   stat_contour(aes(colour = ..level..))
Browse[28]> ##D })){
Browse[28]> ##D   print(direct.label(p,"bottom.pieces"))
Browse[28]> ##D   print(direct.label(p,"top.pieces"))
Browse[28]> ##D }
Browse[28]> ##D 
Browse[28]> ##D ### densityplot Positioning Methods
Browse[28]> ##D for(p in list({
Browse[28]> ##D data(Chem97,package="mlmRev")
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- densityplot(~gcsescore|gender,Chem97,
Browse[28]> ##D             groups=factor(score),layout=c(1,2),
Browse[28]> ##D             n=500,plot.points=FALSE)
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D library(reshape2)
Browse[28]> ##D iris2 <- melt(iris,id="Species")
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- densityplot(~value|variable,iris2,groups=Species,scales="free")
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D loci <- data.frame(ppp=c(rbeta(800,10,10),rbeta(100,0.15,1),rbeta(100,1,0.15)),
Browse[28]> ##D                    type=factor(c(rep("NEU",800),rep("POS",100),rep("BAL",100))))
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D p <- qplot(ppp,data=loci,colour=type,geom="density")
Browse[28]> ##D })){
Browse[28]> ##D   print(direct.label(p,"bottom.points"))
Browse[28]> ##D   print(direct.label(p,"top.bumptwice"))
Browse[28]> ##D   print(direct.label(p,"top.bumpup"))
Browse[28]> ##D   print(direct.label(p,"top.points"))
Browse[28]> ##D }
Browse[28]> ##D 
Browse[28]> ##D ### dotplot Positioning Methods
Browse[28]> ##D for(p in list({
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- dotplot(VADeaths,xlim=c(8,85),type="o")
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D vad <- as.data.frame.table(VADeaths)
Browse[28]> ##D names(vad) <- c("age","demographic","deaths")
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D p <- qplot(deaths,age,data=vad,group=demographic,geom="line",colour=demographic)+
Browse[28]> ##D   xlim(8,80)
Browse[28]> ##D })){
Browse[28]> ##D   print(direct.label(p,"angled.endpoints"))
Browse[28]> ##D   print(direct.label(p,"top.qp"))
Browse[28]> ##D }
Browse[28]> ##D 
Browse[28]> ##D ### lineplot Positioning Methods
Browse[28]> ##D for(p in list({
Browse[28]> ##D data(BodyWeight,package="nlme")
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- xyplot(weight~Time|Diet,BodyWeight,groups=Rat,type='l',
Browse[28]> ##D        layout=c(3,1),xlim=c(-10,75))
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D data(Chem97,package="mlmRev")
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- qqmath(~gcsescore|gender,Chem97,groups=factor(score),
Browse[28]> ##D        type=c('l','g'),f.value=ppoints(100))
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D data(Chem97,package="mlmRev")
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- qqmath(~gcsescore,Chem97,groups=gender,
Browse[28]> ##D        type=c("l","g"),f.value=ppoints(100))
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D data(Prostate,package="lasso2")
Browse[28]> ##D Prostate$train <- c(
Browse[28]> ##D   1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 
Browse[28]> ##D   1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 
Browse[28]> ##D   0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 
Browse[28]> ##D   1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 
Browse[28]> ##D   0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0)
Browse[28]> ##D pros <- subset(Prostate,select=-train,train==1)
Browse[28]> ##D ycol <- which(names(pros)=="lpsa")
Browse[28]> ##D x <- as.matrix(pros[-ycol])
Browse[28]> ##D y <- pros[[ycol]]
Browse[28]> ##D library(lars)
Browse[28]> ##D fit <- lars(x,y,type="lasso")
Browse[28]> ##D beta <- scale(coef(fit),FALSE,1/fit$normx)
Browse[28]> ##D arclength <- rowSums(abs(beta))
Browse[28]> ##D library(reshape2)
Browse[28]> ##D path <- data.frame(melt(beta),arclength)
Browse[28]> ##D names(path)[1:3] <- c("step","variable","standardized.coef")
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D p <- ggplot(path,aes(arclength,standardized.coef,colour=variable))+
Browse[28]> ##D   geom_line(aes(group=variable))+
Browse[28]> ##D   ggtitle("LASSO path for Prostate cancer data calculated using the LARS")+
Browse[28]> ##D   xlim(0,20)
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D data(projectionSeconds, package="directlabels")
Browse[28]> ##D p <- ggplot(projectionSeconds, aes(vector.length/1e6))+
Browse[28]> ##D   geom_ribbon(aes(ymin=min, ymax=max,
Browse[28]> ##D                   fill=method, group=method), alpha=1/2)+
Browse[28]> ##D   geom_line(aes(y=mean, group=method, colour=method))+
Browse[28]> ##D   ggtitle("Projection Time against Vector Length (Sparsity = 10##D 
Browse[28]> ##D   guides(fill="none")+
Browse[28]> ##D   ylab("Runtime (s)")
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D ## complicated ridge regression lineplot ex. fig 3.8 from Elements of
Browse[28]> ##D ## Statistical Learning, Hastie et al.
Browse[28]> ##D myridge <- function(f,data,lambda=c(exp(-seq(-15,15,l=200)),0)){
Browse[28]> ##D   require(MASS)
Browse[28]> ##D   require(reshape2)
Browse[28]> ##D   fit <- lm.ridge(f,data,lambda=lambda)
Browse[28]> ##D   X <- data[-which(names(data)==as.character(f[[2]]))]
Browse[28]> ##D   Xs <- svd(scale(X)) ## my d's should come from the scaled matrix
Browse[28]> ##D   dsq <- Xs$d^2
Browse[28]> ##D   ## make the x axis degrees of freedom
Browse[28]> ##D   df <- sapply(lambda,function(l)sum(dsq/(dsq+l)))
Browse[28]> ##D   D <- data.frame(t(fit$coef),lambda,df) # scaled coefs
Browse[28]> ##D   molt <- melt(D,id=c("lambda","df"))
Browse[28]> ##D   ## add in the points for df=0
Browse[28]> ##D   limpts <- transform(subset(molt,lambda==0),lambda=Inf,df=0,value=0)
Browse[28]> ##D   rbind(limpts,molt)
Browse[28]> ##D }
Browse[28]> ##D data(Prostate,package="lasso2")
Browse[28]> ##D Prostate$train <- c(
Browse[28]> ##D   1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 
Browse[28]> ##D   1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 
Browse[28]> ##D   0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 
Browse[28]> ##D   1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 
Browse[28]> ##D   0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0)
Browse[28]> ##D pros <- subset(Prostate,train==1,select=-train)
Browse[28]> ##D m <- myridge(lpsa~.,pros)
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- xyplot(value~df,m,groups=variable,type="o",pch="+",
Browse[28]> ##D        panel=function(...){
Browse[28]> ##D          panel.xyplot(...)
Browse[28]> ##D          panel.abline(h=0)
Browse[28]> ##D          panel.abline(v=5,col="grey")
Browse[28]> ##D        },
Browse[28]> ##D        xlim=c(-1,9),
Browse[28]> ##D        main="Ridge regression shrinks least squares coefficients",
Browse[28]> ##D        ylab="scaled coefficients",
Browse[28]> ##D        sub="grey line shows coefficients chosen by cross-validation",
Browse[28]> ##D        xlab=expression(df(lambda)))
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D tx <- time(mdeaths)
Browse[28]> ##D Time <- ISOdate(floor(tx),round(tx##D 
Browse[28]> ##D uk.lung <- rbind(data.frame(Time,sex="male",deaths=as.integer(mdeaths)),
Browse[28]> ##D                  data.frame(Time,sex="female",deaths=as.integer(fdeaths)))
Browse[28]> ##D p <- qplot(Time,deaths,data=uk.lung,colour=sex,geom="line")+
Browse[28]> ##D   xlim(ISOdate(1973,9,1),ISOdate(1980,4,1))
Browse[28]> ##D })){
Browse[28]> ##D   print(direct.label(p,"angled.boxes"))
Browse[28]> ##D   print(direct.label(p,"bottom.polygons"))
Browse[28]> ##D   print(direct.label(p,"first.bumpup"))
Browse[28]> ##D   print(direct.label(p,"first.points"))
Browse[28]> ##D   print(direct.label(p,"first.polygons"))
Browse[28]> ##D   print(direct.label(p,"first.qp"))
Browse[28]> ##D   print(direct.label(p,"lasso.labels"))
Browse[28]> ##D   print(direct.label(p,"last.bumpup"))
Browse[28]> ##D   print(direct.label(p,"last.points"))
Browse[28]> ##D   print(direct.label(p,"last.polygons"))
Browse[28]> ##D   print(direct.label(p,"last.qp"))
Browse[28]> ##D   print(direct.label(p,"left.points"))
Browse[28]> ##D   print(direct.label(p,"left.polygons"))
Browse[28]> ##D   print(direct.label(p,"lines2"))
Browse[28]> ##D   print(direct.label(p,"maxvar.points"))
Browse[28]> ##D   print(direct.label(p,"maxvar.qp"))
Browse[28]> ##D   print(direct.label(p,"right.points"))
Browse[28]> ##D   print(direct.label(p,"right.polygons"))
Browse[28]> ##D   print(direct.label(p,"top.polygons"))
Browse[28]> ##D }
Browse[28]> ##D 
Browse[28]> ##D ### scatterplot Positioning Methods
Browse[28]> ##D for(p in list({
Browse[28]> ##D data(mpg,package="ggplot2")
Browse[28]> ##D m <- lm(cty~displ,data=mpg)
Browse[28]> ##D mpgf <- fortify(m,mpg)
Browse[28]> ##D library(lattice)
Browse[28]> ##D library(latticeExtra)
Browse[28]> ##D p <- xyplot(cty~hwy|manufacturer,mpgf,groups=class,aspect="iso",
Browse[28]> ##D        main="City and highway fuel efficiency by car class and manufacturer")+
Browse[28]> ##D   layer_(panel.abline(0,1,col="grey90"))
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D data(mpg,package="ggplot2")
Browse[28]> ##D m <- lm(cty~displ,data=mpg)
Browse[28]> ##D mpgf <- fortify(m,mpg)
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- xyplot(jitter(.resid)~jitter(.fitted),mpgf,groups=factor(cyl))
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- xyplot(jitter(Sepal.Length)~jitter(Petal.Length),iris,groups=Species)
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D data(mpg,package="ggplot2")
Browse[28]> ##D library(lattice)
Browse[28]> ##D p <- xyplot(jitter(cty)~jitter(hwy),mpg,groups=class,
Browse[28]> ##D        main="Fuel efficiency depends on car size")
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D data(mpg,package="ggplot2")
Browse[28]> ##D p <- qplot(jitter(hwy),jitter(cty),data=mpg,colour=class,
Browse[28]> ##D       main="Fuel efficiency depends on car size")
Browse[28]> ##D },
Browse[28]> ##D {
Browse[28]> ##D data(normal.l2.cluster,package="directlabels")
Browse[28]> ##D library(ggplot2)
Browse[28]> ##D p <- ggplot(normal.l2.cluster$path,aes(x,y))+
Browse[28]> ##D   geom_path(aes(group=row),colour="grey")+
Browse[28]> ##D   geom_point(aes(size=lambda),colour="grey")+
Browse[28]> ##D   geom_point(aes(colour=class),data=normal.l2.cluster$pts,pch=21,fill="white")+
Browse[28]> ##D   coord_equal()
Browse[28]> ##D })){
Browse[28]> ##D   print(direct.label(p,"ahull.grid"))
Browse[28]> ##D   print(direct.label(p,"chull.grid"))
Browse[28]> ##D   print(direct.label(p,"extreme.grid"))
Browse[28]> ##D   print(direct.label(p,"smart.grid"))
Browse[28]> ##D }
Browse[28]> ##D 
Browse[28]> ## End(Not run)
Browse[28]> 
debug: method <- c(get(method[[1]]), method[-1])
Browse[28]> 
debug: (while) islist() || isref()
Browse[28]> 
debug: if (islist()) {
    method <- c(method[[1]], method[-1])
} else {
    if (length(method[[1]]) > 1) {
        warning("using first element of character vector")
        method[[1]] <- method[[1]][1]
    }
    method <- c(get(method[[1]]), method[-1])
}
Browse[28]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[28]> base::cat("positioning.functions", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[28]> cleanEx()
Browse[28]> nameEx("qp.labels")
Browse[28]> ### * qp.labels
Browse[28]> 
debug: if (length(method[[1]]) > 1) {
    warning("using first element of character vector")
    method[[1]] <- method[[1]][1]
}
Browse[28]> flush(stderr()); flush(stdout())
Browse[28]> 
debug: method <- c(get(method[[1]]), method[-1])
Browse[28]> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
Browse[28]> ### Name: qp.labels
Browse[28]> ### Title: Make a Positioning Method for non-overlapping lineplot labels
Browse[28]> ### Aliases: qp.labels
Browse[28]> 
debug: (while) islist() || isref()
Browse[28]> ### ** Examples
Browse[28]> 
debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else {
    old <- d
    group.dfs <- split(d, d$groups)
    group.specific <- lapply(group.dfs, only.unique.vals)
    to.restore <- Reduce(intersect, lapply(group.specific, names))
    d <- method[[1]](d, debug = debug, ...)
    if (length(d) == 0) {
        return(data.frame())
    }
    else {
        check.for.columns(d, columns.to.check)
        if ("groups" %in% names(d)) {
            to.restore <- to.restore[!to.restore %in% names(d)]
            for (N in to.restore) {
                d[[N]] <- NA
                group.vec <- paste(unique(d$groups))
                for (g in group.vec) {
                  old.val <- group.specific[[g]][, N]
                  if (is.factor(old.val)) 
                    old.val <- paste(old.val)
                  d[d$groups == g, N] <- old.val
                }
            }
        }
    }
    attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) 
        old
    else attr(old, "orig.data")
}
Browse[28]> SegCost$error <- factor(SegCost$error,c("FP","FN","E","I"))
Browse[28]> if(require(ggplot2)){
+   fp.fn.colors <- c(FP="skyblue",FN="#E41A1C",I="black",E="black")
+   fp.fn.sizes <- c(FP=2.5,FN=2.5,I=1,E=1)
+   fp.fn.linetypes <- c(FP="solid",FN="solid",I="dashed",E="solid")
+   err.df <- subset(SegCost,type!="Signal")
+ 
+   kplot <- ggplot(err.df,aes(segments,cost))+
+     geom_line(aes(colour=error,size=error,linetype=error))+
+     facet_grid(type~bases.per.probe)+
+     scale_linetype_manual(values=fp.fn.linetypes)+
+     scale_colour_manual(values=fp.fn.colors)+
+     scale_size_manual(values=fp.fn.sizes)+
+     scale_x_continuous(limits=c(0,20),breaks=c(1,7,20),minor_breaks=NULL)+
+     theme_bw()+theme(panel.margin=grid::unit(0,"lines"))
+ 
+   ## The usual ggplot without direct labels.
+   print(kplot)
+ 
+   ## Get rid of legend for direct labels.
+   no.leg <- kplot+guides(colour="none",linetype="none",size="none")
+ 
+   ## Default direct labels.
+   direct.label(no.leg)
+ 
+   ## Explore several options for tiebreaking and limits. First let's
+   ## make a qp.labels Positioning Method that does not tiebreak.
+   no.tiebreak <- list("first.points",
+                       "calc.boxes",
+                       qp.labels("y","bottom","top"))
+   direct.label(no.leg, no.tiebreak)
+ 
+   ## Look at the weird labels in the upper left panel. The E curve is
+   ## above the FN curve, but the labels are the opposite! This is
+   ## because they have the same y value on the first points, which are
+   ## the targets for qp.labels. We need to tiebreak.
+   qp.break <- qp.labels("y","bottom","top",make.tiebreaker("x","y"))
+   tiebreak <- list("first.points",
+                    "calc.boxes",
+                    "qp.break")
+   direct.label(no.leg, tiebreak)
+ 
+   ## Enlarge the text size and spacing.
+   tiebreak.big <- list("first.points",
+                        cex=2,
+                        "calc.boxes",
+                        dl.trans(h=1.25*h),
+                        "calc.borders",
+                        "qp.break")
+   direct.label(no.leg, tiebreak.big)
+ 
+   ## Even on my big monitor, the FP runs off the bottom of the screen
+   ## in the top panels. To avoid that you can specify a limits
+   ## function.
+ 
+   ## Below, the ylimits function uses the limits of each panel, so
+   ## labels appear inside the plot region. Also, if you resize your
+   ## window so that it is small, you can see that the text size of the
+   ## labels is decreased until they all fit in the plotting region.
+   qp.limited <-  qp.labels("y","bottom","top",make.tiebreaker("x","y"),ylimits)
+   tiebreak.lim <- list("first.points",
+                        cex=2,
+                        "calc.boxes",
+                        dl.trans(h=1.25*h),
+                        "calc.borders",
+                        "qp.limited")
+   direct.label(no.leg, tiebreak.lim)
+ }
Loading required package: ggplot2
debug: fp.fn.colors <- c(FP = "skyblue", FN = "#E41A1C", I = "black", 
    E = "black")
Browse[29]> 
debug: fp.fn.sizes <- c(FP = 2.5, FN = 2.5, I = 1, E = 1)
Browse[29]> 
debug: fp.fn.linetypes <- c(FP = "solid", FN = "solid", I = "dashed", 
    E = "solid")
Browse[29]> 
debug: err.df <- subset(SegCost, type != "Signal")
Browse[29]> base::assign(".dptime", (proc.time() - get(".ptime", pos = "CheckExEnv")), pos = "CheckExEnv")
Browse[29]> base::cat("qp.labels", base::get(".format_ptime", pos = 'CheckExEnv')(get(".dptime", pos = "CheckExEnv")), "\n", file=base::get(".ExTimings", pos = 'CheckExEnv'), append=TRUE, sep="\t")
Browse[29]> ### * 
Browse[29]> ### Browse[29]> cleanEx() detaching ‘package:ggplot2’ Browse[29]> options(digits = 7L) Browse[29]> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") Time elapsed: 3.434 0.136 3.57 0 0 Browse[29]> grDevices::dev.off() null device 1 Browse[29]> ### Browse[29]> ### Local variables: *** Browse[29]> ### mode: outline-minor *** Browse[29]> ### outline-regexp: "\\(> \\)?### [*]+" *** Browse[29]> ### End: *** Browse[29]> quit('no') Warning in quit("no") : cannot quit from browser Browse[29]> debug: kplot <- ggplot(err.df, aes(segments, cost)) + geom_line(aes(colour = error, size = error, linetype = error)) + facet_grid(type ~ bases.per.probe) + scale_linetype_manual(values = fp.fn.linetypes) + scale_colour_manual(values = fp.fn.colors) + scale_size_manual(values = fp.fn.sizes) + scale_x_continuous(limits = c(0, 20), breaks = c(1, 7, 20), minor_breaks = NULL) + theme_bw() + theme(panel.margin = grid::unit(0, "lines")) Browse[29]> Error in ggplot(err.df, aes(segments, cost)) : could not find function "ggplot" Calls: print ... drawGrob -> drawDetails -> drawDetails.dlgrob -> apply.method Browse[28]> debug: old <- d Browse[28]> debug: group.dfs <- split(d, d$groups) Browse[28]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[28]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[28]> debug: d <- method[[1]](d, debug = debug, ...) Browse[28]> Called from: apply.method(FUN, d, ...) Browse[28]> debug: attr(d, "orig.data") <- d Browse[29]> debug: check.for.columns(d, columns.to.check) Browse[29]> debug: if (!is.list(method)) method <- list(method) Browse[29]> debug: method <- list(method) Browse[29]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[29]> debug: islist <- function() is.list(method[[1]]) Browse[29]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[29]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[29]> debug: if (debug) print(method[1]) Browse[29]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[29]> debug: if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } Browse[29]> debug: if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } Browse[29]> debug: method <- c(get(method[[1]]), method[-1]) Browse[29]> debug: (while) islist() || isref() Browse[29]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[29]> debug: old <- d Browse[29]> debug: group.dfs <- split(d, d$groups) Browse[29]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[29]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[29]> debug: d <- method[[1]](d, debug = debug, ...) Browse[29]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> Called from: apply.method(method, d, columns.to.check = c("x", "y"), ...) Browse[29]> debug: attr(d, "orig.data") <- d Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if (!is.list(method)) method <- list(method) Browse[30]> debug: method <- list(method) Browse[30]> debug: isconst <- function() { m.var <- names(method)[1] !(is.null(m.var) || m.var == "") } Browse[30]> debug: islist <- function() is.list(method[[1]]) Browse[30]> debug: isref <- function() (!isconst()) && is.character(method[[1]]) Browse[30]> debug: while (length(method)) { if (debug) print(method[1]) while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } if (debug) { print(d) } method <- method[-1] } Browse[30]> debug: if (debug) print(method[1]) Browse[30]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[30]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[30]> debug: old <- d Browse[30]> debug: group.dfs <- split(d, d$groups) Browse[30]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[30]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[30]> debug: d <- method[[1]](d, debug = debug, ...) Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[30]> debug: check.for.columns(d, columns.to.check) Browse[30]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[30]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[30]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[30]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[30]> debug: attr(old, "orig.data") Browse[30]> debug: if (debug) { print(d) } Browse[30]> debug: method <- method[-1] Browse[30]> debug: (while) length(method) Browse[30]> debug: d Browse[30]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[29]> debug: check.for.columns(d, columns.to.check) Browse[29]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[29]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[29]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[29]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[29]> debug: attr(old, "orig.data") Browse[29]> debug: if (debug) { print(d) } Browse[29]> debug: method <- method[-1] Browse[29]> debug: (while) length(method) Browse[29]> debug: d Browse[29]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[28]> debug: check.for.columns(d, columns.to.check) Browse[28]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[28]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[28]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[28]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[28]> debug: attr(old, "orig.data") Browse[28]> debug: if (debug) { print(d) } Browse[28]> debug: method <- method[-1] Browse[28]> debug: (while) length(method) Browse[28]> debug: if (debug) print(method[1]) Browse[28]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[28]> debug: if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } Browse[28]> debug: if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } Browse[28]> debug: method <- c(get(method[[1]]), method[-1]) Browse[28]> debug: (while) islist() || isref() Browse[28]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[28]> debug: old <- d Browse[28]> debug: group.dfs <- split(d, d$groups) Browse[28]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[28]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[28]> debug: d <- method[[1]](d, debug = debug, ...) Browse[28]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[28]> debug: check.for.columns(d, columns.to.check) Browse[28]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[28]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[28]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[28]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[28]> debug: attr(old, "orig.data") Browse[28]> debug: if (debug) { print(d) } Browse[28]> debug: method <- method[-1] Browse[28]> debug: (while) length(method) Browse[28]> debug: if (debug) print(method[1]) Browse[28]> debug: while (islist() || isref()) { if (islist()) { method <- c(method[[1]], method[-1]) } else { if (length(method[[1]]) > 1) { warning("using first element of character vector") method[[1]] <- method[[1]][1] } method <- c(get(method[[1]]), method[-1]) } } Browse[28]> debug: if (isconst()) d[[names(method)[1]]] <- method[[1]] else { old <- d group.dfs <- split(d, d$groups) group.specific <- lapply(group.dfs, only.unique.vals) to.restore <- Reduce(intersect, lapply(group.specific, names)) d <- method[[1]](d, debug = debug, ...) if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") } Browse[28]> debug: old <- d Browse[28]> debug: group.dfs <- split(d, d$groups) Browse[28]> debug: group.specific <- lapply(group.dfs, only.unique.vals) Browse[28]> debug: to.restore <- Reduce(intersect, lapply(group.specific, names)) Browse[28]> debug: d <- method[[1]](d, debug = debug, ...) Browse[28]> debug: if (length(d) == 0) { return(data.frame()) } else { check.for.columns(d, columns.to.check) if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } } Browse[28]> debug: check.for.columns(d, columns.to.check) Browse[28]> debug: if ("groups" %in% names(d)) { to.restore <- to.restore[!to.restore %in% names(d)] for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } } Browse[28]> debug: to.restore <- to.restore[!to.restore %in% names(d)] Browse[28]> debug: for (N in to.restore) { d[[N]] <- NA group.vec <- paste(unique(d$groups)) for (g in group.vec) { old.val <- group.specific[[g]][, N] if (is.factor(old.val)) old.val <- paste(old.val) d[d$groups == g, N] <- old.val } } Browse[28]> debug: attr(d, "orig.data") <- if (is.null(attr(old, "orig.data"))) old else attr(old, "orig.data") Browse[28]> debug: attr(old, "orig.data") Browse[28]> debug: if (debug) { print(d) } Browse[28]> debug: method <- method[-1] Browse[28]> debug: (while) length(method) Browse[28]> debug: d Browse[28]> *** caught segfault *** address 0x555bef092b30, cause 'invalid permissions' Traceback: 1: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 2: grid.draw.grob(g) 3: grid.draw(g) 4: panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...) 5: (function (panel.groups = paste("panel.", lattice.fun.name, sep = ""), ...) { panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...)})(x = base::quote(c(1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64)), y = base::quote(c(240, 250, 255, 260, 262, 258, 266, 266, 265, 272, 278, 225, 230, 230, 232, 240, 240, 243, 244, 238, 247, 245, 245, 250, 250, 255, 262, 265, 267, 267, 264, 268, 269, 260, 255, 255, 265, 265, 268, 270, 272, 274, 273, 275, 255, 260, 255, 270, 270, 273, 274, 273, 276, 278, 280, 260, 265, 270, 275, 275, 277, 278, 278, 284, 279, 281, 275, 275, 260, 270, 273, 274, 276, 271, 282, 281, 284, 245, 255, 260, 268, 270, 265, 265, 267, 273, 274, 278)), subscripts = base::quote(1:88), type = base::quote("l"), groups = base::quote(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L)), debug = base::quote(FALSE)) 6: do.call(FUN, args, quote = TRUE) 7: checkArgsAndCall(panel, pargs) 8: printFunction(x, ...) 9: print.trellis(direct.label(regular)) 10: print(direct.label(regular)) 11: apply.method(translator, d, ...) 12: panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...) 13: (function (panel.groups = paste("panel.", lattice.fun.name, sep = ""), ...) { panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...)})(x = base::quote(c(0.420244087808528, 0.523186760148971, 0.392916080539134, 0.710401457351212, 0.541678170471278, 0.394913190164719, 0.561839288553282, 0.594311619135035, 0.573204859483225, 0.461386657720376, 0.698798520926535, 0.549360334791414, 0.420919224895061, 0.645718629003261, 0.494331049706722, 0.497957479708459, 0.621417308155745, 0.605185919686423, 0.57554459643038, 0.618112107797008, 0.600049058088807, 0.50940813735312, 0.578897591581998, 0.492918444463173, 0.480333790899296, 0.306890035389296, 0.439350454010686, 0.552946183171333, 0.677630415483499, 0.487029319819218, 0.549083424646415, 0.493211660335821, 0.447430167418614, 0.450072551759752, 0.492516581891964, 0.642353503110286, 0.597563389655246, 0.479230631315211, 0.467987164920741, 0.588914554821147, 0.570739586758543, 0.412154236138711, 0.409712964622655, 0.546141144331292, 0.598265286798538, 0.48582243676732, 0.6130912164663, 0.550414221327856, 0.543154884710456, 0.353681763406901, 0.687888385538984, 0.453522683378685, 0.365171751202956, 0.572422837151512, 0.482954422013607, 0.495049429587664, 0.587973817857431, 0.503532724745991, 0.405041413846794, 0.523837972243849, 0.692390068071441, 0.519344940317189, 0.560311110848773, 0.409393345051019, 0.577719951749953, 0.379878403555096, 0.536843185416614, 0.443813765384227, 0.500139447820412, 0.509379910735782, 0.425021306577825, 0.427712703860698, 0.482938755916284, 0.652924605865804, 0.299565682068231, 0.575550392008785, 0.542115887412927, 0.637377632617254, 0.461539623715945, 0.546833639186003, 0.533754329740117, 0.431082004965315, 0.65697556850893, 0.650523722747187, 0.589337994451604, 0.709226391811172, 0.570974544127547, 0.42711976363334, 0.340742472896548, 0.43995914430548, 0.421032375904897, 0.50531342549377, 0.38295738086246, 0.519948454419459, 0.416596277870877, 0.734348941954302, 0.591488552028844, 0.616943431438951, 0.548638947887798, 0.722498381965695, 0.419041267814071, 0.441465021919587, 0.687785869076495, 0.417100966107045, 0.473810297944358, 0.450261578856433, 0.45953127301224, 0.464721809909201, 0.562706401798385, 0.477611530554387, 0.435782886156912, 0.675478176100606, 0.472899211514366, 0.477330051061943, 0.48735719080689, 0.590961369784252, 0.490718142114822, 0.495252036207818, 0.413077582277362, 0.458987634968282, 0.507590307294162, 0.425102224433258, 0.567499413944547, 0.538761869880671, 0.297776773374158, 0.461946971599957, 0.432914266405869, 0.416919474656519, 0.492821529283768, 0.652720326540066, 0.279897442180799, 0.44122355233936, 0.355499706004368, 0.40405435624394, 0.778499923320361, 0.502194588485313, 0.332310441603748, 0.557068360073306, 0.497658533790187, 0.459775832649587, 0.380508042647308, 0.304574715103466, 0.360994630634801, 0.628915972959218, 0.420915845252462, 0.31882203157569, 0.553860677988013, 0.469851620742526, 0.613794857216828, 0.421177844601325, 0.467776088569783, 0.313290641402212, 0.481773815404822, 0.526209644312768, 0.808068897751509, 0.513351300512018, 0.557940160245517, 0.490265238195485, 0.457750532029413, 0.495618953407545, 0.600771287744083, 0.776875724246717, 0.632581264828229, 0.656981096240913, 0.339827095454826, 0.626759176761224, 0.527777450062816, 0.307375153707572, 0.566152655010713, 0.479959810703659, 0.692256076348167, 0.402055870516083, 0.445486145578965, 0.380940368579749, 0.477640172230444, 0.550912575833985, 0.406547776884982, 0.606391297493584, 0.364654592927814, 0.689013288360426, 0.368966253549748, 0.552184241682337, 0.451757398482541, 0.551855774203251, 0.458143828744089, 0.58502483291678, 0.568764461582859, 0.498309554734285, 0.564750221858941, 0.479249308826741, 0.553297829883111, 0.449312636934828, 0.627285972286931, 0.699903794585003, 0.460960895108166, 0.33682749860647, 0.581802135847941, 0.494359371302129, 0.270393540239999, 0.500268947922104, 0.419745768697634, 0.456864338297585, 0.349995828609199, 0.739336503046394, 0.458115318629075, 0.28817483243713, 0.524900693502645, 0.533256892148865, 0.372982822814107, 0.418426052027294, 0.572524479653674, 0.492464860240161, 0.487611199965827, 0.571275407429868, 0.345937616633757, 0.641915132645238, 0.499325815164855, 0.590262984878984, 0.528227610096822, 0.387226425138993, 0.650871322646598, 0.430789667784436, 0.467694503005148, 0.479028703733236, 0.631652355741766, 0.517193034050109, 0.551570576305268, 0.49121154693237, 0.468709178902947, 0.588730559075749, 0.648601917609996, 0.572812395810937, 0.547433147320763, 0.44611794048366, 0.622372883015358, 0.450716948694264, 0.464059843192903, 0.609957931211093, 0.534129204312476, 0.446511915960311, 0.345576670460935, 0.45812791176524, 0.379115939616927, 0.467281030112589, 0.54993882874213, 0.390775275075391, 0.519693529288453, 0.646432468175347, 0.594661504901629, 0.328203643510465, 0.618221853667533, 0.550417318678866, 0.448383347314872, 0.672896823795459, 0.410529353095115, 0.426171391316008, 0.370944434657197, 0.41483060417384, 0.621596849778037, 0.554959999123549, 0.629602493417601, 0.450604542747062, 0.547642875963777, 0.530847418798143, 0.313047016365558, 0.516968906662263, 0.597880845691348, 0.622922257994076, 0.493620404267421, 0.461332423674754, 0.614755362097886, 0.364746791539868, 0.451431579083038, 0.718594880216252, 0.698858397663999, 0.51046842761616, 0.572100576126373, 0.367800095999077, 0.5408517356898, 0.634758123229026, 0.512502390106302, 0.442426164533443, 0.416440854786679, 0.495468005716116, 0.638193355701759, 0.438603677207541, 0.48472834392381, 0.33123612411006, 0.562722375519257, 0.670651198155643, 0.696753695710362, 0.604327984078274, 0.561146878857219, 0.557829660116346, 0.455282478568699, 0.521523538020895, 0.389166641761983, 0.586606344789362, 0.458627802617125, 0.293242120943656, 0.453493478569475, 0.678422923971962, 0.457714858447359, 0.593583114060552, 0.621783327116883, 0.500554926441212, 0.455419683873439, 0.432732201011032, 0.59447691532846, 0.36257425987437, 0.531106644262339, 0.463403916243349, 0.315451817636527, 0.617719301794717, 0.475847499349416, 0.602826177959736, 0.751043244356122, 0.586351125799709, 0.548100696105413, 0.475655294834143, 0.575846042383325, 0.347688020420781, 0.48035312279118, 0.244605505942805, 0.475344049659782, 0.671488442123725, 0.419066339731036, 0.44551591318194, 0.47862452061113, 0.577912965252183, 0.586490508856149, 0.572194855762511, 0.427213012050622, 0.321734589171104, 0.45078260909433, 0.535126060780479, 0.394569195492649, 0.491314258943318, 0.348491100091517, 0.498951760681662, 0.516262515998718, 0.481587319163275, 0.479308072178283, 0.733829108997847, 0.597486210850119, 0.643893698251614, 0.381326054320358, 0.520746393470418, 0.649767238474673, 0.492868892916029, 0.543628907711184, 0.672861890645161, 0.578355363623669, 0.641226038694364, 0.538767840299439, 0.486098646112918, 0.381179129745346, 0.710072173409892, 0.505678665355881, 0.408717462624884, 0.61099025654344, 0.638904185106051, 0.423279701829545, 0.450509006058876, 0.447273421799552, 0.452447964648948, 0.453597897316703, 0.462619708947305, 0.411010556225944, 0.450853344353389, 0.58313785190969, 0.645697195168017, 0.401265758913443, 0.435509508296066, 0.566486614559803, 0.631289221425104, 0.468265614914215, 0.726250898958979, 0.688171275896706, 0.409337959638971, 0.491790448870836, 0.572423268431238, 0.400287811016816, 0.418335898044959, 0.41314641533954, 0.22885851744567, 0.563575944291059, 0.298422788266468, 0.496846334747956, 0.575426164387603, 0.474972539984774, 0.614534712687681, 0.496755822618811, 0.417494907725059, 0.445023304787373, 0.497696398127725, 0.609351188431594, 0.525909045262424, 0.321346103910485, 0.446266850102619, 0.529914865311873, 0.18738671782453, 0.623796589949244, 0.423094997023327, 0.403785006128307, 0.295114567454584, 0.30922443724832, 0.507107182987832, 0.564655302127631, 0.370504207214575, 0.568049471482304, 0.442566926209745, 0.78909180005301, 0.662141891182348, 0.575750920286681, 0.500616205685046, 0.535309584863726, 0.409920118734382, 0.579958425221877, 0.694420899847607, 0.640115208015604, 0.395863906793267, 0.286315104231895, 0.486162165636638, 0.55587896124623, 0.327879019116717, 0.546116009006605, 0.529496399037939, 0.655081890709679, 0.496478906908439, 0.454786212207149, 0.351318704069185, 0.434310330552681, 0.454171891940294, 0.478955102352126, 0.365234496366301, 0.565336444592809, 0.358921696137602, 0.38631174730245, 0.514021014493529, 0.356446875833129, 0.538889994015055, 0.35671909281788, 0.543986179549583, 0.387946529051157, 0.509753716404789, 0.462468483790233, 0.346374845706391, 0.501424651189031, 0.62778890325153, 0.710218755124976, 0.46846250639424, 0.650391036587236, 0.355729150762642, 0.37963834351729, 0.375464236617041, 0.505991328587593, 0.448867291157783, 0.529242629634076, 0.44648784701166, 0.547355932633361, 0.453677522675275, 0.654557712932968, 0.405818717900929, 0.536744235763913, 0.386413439340572, 0.526268889207343, 0.49397818783138, 0.277175101675345, 0.48179567771319, 0.65321356875276, 0.586888521231362, 0.518080637864017, 0.651721533840154, 0.509993341811117, 0.442728605347849, 0.716907719546607, 0.4015958742764, 0.538355865653591, 0.667064511739235, 0.576620158958127, 0.461179146330098, 0.446992952305651, 0.544938396406276, 0.56518348459489, 0.50234746759784, 0.672098941768341, 0.491693981477895, 0.41065126407293, 0.568249492715262, 0.549632031626891, 0.563062195823917, 0.471595850972376, 0.355334389185324, 0.449982670699595, 0.704082057900426, 0.405009864626066, 0.604004693201968, 0.436379498314614, 0.43514982404163, 0.34200322778626, 0.497154042670874, 0.589471639800918, 0.425284653798146, 0.422797263929447, 0.64189667234462, 0.468728776337164, 0.479814829297549, 0.420331591107325, 0.615651509864146, 0.371864472580317, 0.608880650777143, 0.603144189715489, 0.440702199388718, 0.608771103448628, 0.627143203258018, 0.573184076678822, 0.769984476950458, 0.238606934077152, 0.348863192026769, 0.319912169769929, 0.521168359085296, 0.708919784776393, 0.721901334916935, 0.561950574839769, 0.612769031416577, 0.481713765441186, 0.559473406608799, 0.547625693897259, 0.40271630715098, 0.462922155443227, 0.482981373423521, 0.682477126785515, 0.366131220774939, 0.217807602114764, 0.598231908479894, 0.395480178127477, 0.444732567383135, 0.616217818212786, 0.402448329592351, 0.456851821647045, 0.69750038608119, 0.567089310080585, 0.568875683925166, 0.482749930945505, 0.352684108880209, 0.303303694932747, 0.471784388423726, 0.766811035763197, 0.528002678201631, 0.520750321558519, 0.542074338285384, 0.451230680328111, 0.316845601003191, 0.446320018474751, 0.462248480839054, 0.46866560375982, 0.468754848492259, 0.467714825874687, 0.262916986316857, 0.58795570750753, 0.357549957816394, 0.591201779322567, 0.468860476983979, 0.459557543018284, 0.678176323113938, 0.340296497403881, 0.435107091132157, 0.406620040402415, 0.502491869740372, 0.292716333036361, 0.410255477080274, 0.59138738741185, 0.558992183739225, 0.374575216375923, 0.571068793621239, 0.456925859905405, 0.591009224926992, 0.416018137829385, 0.495407420262548, 0.608688289573778, 0.45906639511155, 0.467748068006924, 0.507686310069684, 0.312541242925232, 0.532111119430325, 0.500304770832799, 0.564693338269967, 0.359710909470475, 0.589939994360499, 0.541864889221675, 0.625748503167966, 0.391899219024322, 0.37501859397192, 0.459216410471366, 0.325104633455817, 0.587767706700632, 0.508993635042195, 0.349841858452243, 0.653413929046376, 0.433031490865228, 0.308845950326522, 0.572841784517749, 0.312062672063732, 0.363686830217013, 0.406369611217963, 0.526636006419664, 0.371232259294087, 0.639363393511818, 0.34423518662448, 0.527361244923852, 0.51806034612148, 0.362265771084401, 0.445689140679261, 0.416389229574144, 0.623489672237344, 0.365620038085152, 0.619652847080641, 0.49048068024088, 0.237939549136046, 0.403388880579217, 0.558471521363479, 0.518315519125707, 0.57379045009132, 0.583464390011181, 0.461498359294631, 0.409703434333458, 0.762663476838878, 0.488643834426682, 0.498231623767178, 0.354480729397442, 0.324371733802721, 0.299622742280744, 0.446539482269117, 0.677939503849978, 0.732471054873485, 0.706658127685701, 0.669122452879124, 0.46998473796941, 0.340805537468568, 0.458537332565155, 0.460319080368448, 0.719393245386579, 0.516527478964084, 0.641795269288528, 0.562084517660472, 0.400374146554804, 0.731046205665245, 0.490109447175694, 0.374354778792247, 0.508915286746021, 0.300255204369742, 0.610799408645208, 0.563653586712231, 0.455106690536857, 0.438032472026432, 0.620413716540645, 0.362715394011907, 0.373250801908322, 0.553751756710388, 0.442787504417315, 0.618923460388248, 0.474918723478207, 0.655203750278401, 0.562880448442475, 0.200231024959472, 0.325576111230365, 0.667206648069616, 0.588111368829318, 0.375487818788432, 0.324142906723234, 0.633422769619097, 0.396056998080613, 0.734941004118847, 0.391593886763566, 0.33721150868422, 0.585053668018185, 0.331698057646062, 0.629711486602013, 0.604646551687994, 0.415375075164493, 0.498576792751916, 0.57887836861362, 0.333003780870361, 0.484317730851714, 0.522187575393707, 0.723974295237014, 0.581788053281045, 0.66713239420002, 0.517739432554886, 0.355961519622212, 0.457028635763488, 0.619424107314572, 0.685649851446254, 0.492086600862874, 0.373640635018597, 0.64061670303798, 0.517585309212841, 0.451095014167007, 0.645536648950423, 0.402872750872337, 0.648971990622509, 0.392013136397356, 0.54956056093803, 0.614451094624539, 0.325591600846121, 0.550416466359914, 0.485918326833511, 0.586152865030318, 0.399102907422475, 0.489024079116562, 0.521270783982489, 0.605445265058704, 0.472099774465757, 0.367150595046107, 0.498621647593418, 0.34069085419866, 0.651707134721688, 0.359415849343969, 0.628281041386813, 0.498503552641437, 0.423715245155486, 0.477533449142728, 0.446026757947643, 0.628465185476327, 0.592918333678956, 0.544717293943653, 0.592807717921339, 0.58518010015888, 0.470268320416395, 0.763773568587087, 0.60197350907112, 0.273727498109186, 0.280078989776994, 0.562311394863868, 0.478025616532073, 0.623742455303728, 0.537145341222478, 0.510220236885282, 0.523189100386281, 0.520988235785495, 0.334597174510748, 0.315016125853965, 0.497860181901385, 0.430850358572763, 0.738915245015913, 0.428351284013441, 0.525941679584426, 0.651210230312317, 0.798594500252394, 0.538216702258656, 0.365390391905146, 0.373288013913815, 0.466974492550307, 0.442393353600884, 0.519889278409107, 0.620027323838688, 0.538288220957965, 0.544734885934847, 0.557098738871317, 0.584048548193884, 0.36687840418638, 0.45894873814881, 0.378521119612098, 0.402081028936198, 0.377258593099392, 0.449598720121404, 0.460646313260055, 0.601881310030165, 0.398323741912697, 0.460951062534895, 0.545741643278187, 0.683159521621893, 0.492925804790998, 0.529287768172835, 0.484970749861245, 0.543447790903632, 0.420684956630104, 0.444295862074949, 0.435867721573669, 0.523489251401381, 0.522273067644845, 0.61769658465585, 0.540492090167852, 0.453590719319726, 0.379011890082768, 0.580824769406165, 0.492115915288764, 0.523084897958179, 0.6428415842042, 0.732226172880349, 0.377253640979475, 0.717193459606954, 0.388810098489217, 0.533659659102921, 0.528087081958886, 0.465001508802259, 0.682533316333464, 0.416034421969111, 0.584175874247593, 0.147279640935516, 0.0185610992160668, 0.0088440648836927, 0.000128970062761369, 0.000117531004255511, 0.0117303538826803, 0.0515655036172052, 0.028659448649582, 8.37059189251506e-05, 0.0926520073252642, 4.81659983840556e-12, 0.00357733379019999, 0.0016329908282457, 0.00377528626153489, 2.0034581509538e-05, 0.483401332959646, 0.0745833427445194, 0.189370198791911, 9.71134124090024e-05, 1.08720398031055e-05, 0.0120648431470887, 2.02138631101897e-05, 2.71621714853513e-08, 0.968103562116814, 0.000918045570953577, 2.01637064021712e-07, 0.000525398265395389, 0.385656653544501, 0.0243133581205581, 3.39070278006846e-06, 0.00187179370675475, 0.156457697476286, 4.74875667182721e-05, 9.47949798341755e-06, 0.00255191321926674, 0.000653405357833771, 1.25379033633293e-12, 0.0701242078643199, 0.00102913024753733, 0.0633966521455734, 4.24274803197557e-05, 0.186950273250315, 2.92063723331616e-05, 0.000600082143162453, 0.0397016222153758, 0.810110779944389, 0.0156191786508079, 0.0668855548448622, 2.26800545776898e-06, 0.601014230740757, 0.00350103084693055, 0.490592820995179, 1.08135598518709e-12, 0.831049753487829, 3.18085570508452e-05, 2.80225404775481e-05, 3.59961103177983e-05, 0.00051007919985415, 0.635788836869919, 9.58317491262278e-06, 1.04262136920568e-05, 0.138314020571811, 0.000954998110771224, 0.00763482781051409, 4.58763124166354e-05, 0.0302180754119985, 0.0289072080151103, 0.0875472230431004, 0.0136618440383872, 1.91159443710475e-15, 0.686331864697067, 2.20218830984306e-08, 0.0255958496586303, 1.23549746907651e-05, 0.35864222924903, 0.00978177256602231, 0.000373423409347906, 0.221415067712205, 0.401924611096398, 0.0135473909863303, 0.104557879077075, 0.0253132240865496, 6.5232997446125e-05, 0.14187677142986, 0.362837480879617, 1.01880463934414e-06, 0.00250216056061671, 0.679452824898436, 0.0207718581088224, 0.200905184019974, 0.000297926979566131, 0.0639984549917468, 6.9258590251968e-05, 0.00415615108897797, 0.000418771296589277, 9.60851226128689e-05, 0.314083488187718, 0.302014710990197, 0.598466566746779, 0.00230708251970451, 0.999975080750043, 0.999979975433168, 0.592767987413649, 0.99996741314675, 0.95853396805077, 0.619258207036087, 0.823282550801803, 0.95330019545724, 0.476330633445985, 0.999963863191037, 0.999985921688254, 0.602217025986063, 0.999999999999912, 0.853290891666692, 0.998195651138888, 0.999999852615744, 0.887172583124353, 0.99992390079007, 0.452260875346389, 0.423745217060182, 0.981765399920468, 0.999999919295767, 0.99999993164285, 0.97390813946624, 0.788395879825417, 0.99949791723075, 0.791057261150038, 0.75485128739381, 0.21971040752075, 0.99994987418833, 0.997973876980137, 0.99998647856781, 0.959389139621962, 0.999160451402115, 0.228975565723081, 0.932914147020044, 0.999999999999998, 0.999999982524917, 0.93031829428046, 0.999999957686728, 0.856963369781786, 0.862572454082405, 0.999842999629753, 0.999999999322974, 0.999997611484261, 0.999923204755794, 0.999999999999122, 0.999999867195179, 0.927560776580194, 0.672044061792466, 0.999954389495023, 0.999999999999554, 0.976010143844742, 0.678929840014108, 0.978879858157937, 0.998111160135349, 0.833281543038264, 1, 0.789603872548653, 0.996114952318077, 0.999999998647439, 0.999746121952419, 0.9999999704085, 0.988994303221162, 0.981740314156058, 0.849669620150347, 0.527718540780658, 0.999999677389767, 0.135344144390942, 0.99995009860574, 0.996344575849825, 0.999999517971105, 0.999962713364325, 0.866450152906845, 0.816139551859215, 0.210696105830019, 0.999986398426783, 0.999999984585001, 0.719991356981697, 0.932286452944858, 0.572692945733825, 0.0891437544438648, 0.245754122273531, 0.999989283849759, 0.999941035488459, 0.99999945387705, 0.746966731091274, 0.553427103941304, 0.999702046359956, 0.79294895978971, 0.999999997080415, 0.947353661665043, 0.999983938727636, 0.729733796703138, 0.950753713912939, 0.999951357364374, 0.978190070703357, 0.999999207345561, 0.961012916701855, 0.662212414029471)), subscripts = base::quote(1:1000), darg = base::quote(list(give.Rkern = FALSE, n = 500, na.rm = TRUE)), groups = base::quote(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L)), debug = base::quote(FALSE)) 14: do.call(FUN, args, quote = TRUE) 15: checkArgsAndCall(panel, pargs) 16: printFunction(x, ...) 17: print.trellis(direct.label(densityplot(~ppp, loci, groups = type, n = 500))) 18: print(direct.label(densityplot(~ppp, loci, groups = type, n = 500))) 19: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 20: drawDetails.dlgrob(x, recording = FALSE) 21: drawDetails(x, recording = FALSE) 22: drawGrob(x) 23: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 24: grid.draw.grob(x$children[[i]], recording = FALSE) 25: grid.draw(x$children[[i]], recording = FALSE) 26: drawGTree(x) 27: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 28: grid.draw.gTree(x$children[[i]], recording = FALSE) 29: grid.draw(x$children[[i]], recording = FALSE) 30: drawGTree(x) 31: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 32: grid.draw.gTree(gtable) 33: grid.draw(gtable) 34: print.ggplot(direct.label(p)) 35: print(direct.label(p)) 36: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 37: drawDetails.dlgrob(x, recording = FALSE) 38: drawDetails(x, recording = FALSE) 39: drawGrob(x) 40: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 41: grid.draw.grob(x$children[[i]], recording = FALSE) 42: grid.draw(x$children[[i]], recording = FALSE) 43: drawGTree(x) 44: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 45: grid.draw.gTree(x$children[[i]], recording = FALSE) 46: grid.draw(x$children[[i]], recording = FALSE) 47: drawGTree(x) 48: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 49: grid.draw.gTree(gtable) 50: grid.draw(gtable) 51: print.ggplot(direct.label(p2, list(first.points, get.means))) 52: print(direct.label(p2, list(first.points, get.means))) 53: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 54: drawDetails.dlgrob(x, recording = FALSE) 55: drawDetails(x, recording = FALSE) 56: drawGrob(x) 57: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 58: grid.draw.grob(x$children[[i]], recording = FALSE) 59: grid.draw(x$children[[i]], recording = FALSE) 60: drawGTree(x) 61: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 62: grid.draw.gTree(x$children[[i]], recording = FALSE) 63: grid.draw(x$children[[i]], recording = FALSE) 64: drawGTree(x) 65: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 66: grid.draw.gTree(gtable) 67: grid.draw(gtable) 68: print.ggplot(direct.label(leg, list("last.points", rot = 30))) 69: print(direct.label(leg, list("last.points", rot = 30))) 70: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 71: drawDetails.dlgrob(x, recording = FALSE) 72: drawDetails(x, recording = FALSE) 73: drawGrob(x) 74: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 75: grid.draw.grob(g) 76: grid.draw(g) 77: panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...) 78: (function (panel.groups = paste("panel.", lattice.fun.name, sep = ""), ...) { panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...)})(x = base::quote(c(11.7, 18.1, 26.9, 41, 66, 8.7, 11.7, 20.3, 30.9, 54.3, 15.4, 24.3, 37, 54.6, 71.1, 8.4, 13.6, 19.3, 35.1, 50)), y = base::quote(c(1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L)), subscripts = base::quote(1:20), type = base::quote("o"), box.ratio = base::quote(1), horizontal = base::quote(TRUE), groups = base::quote(c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L)), debug = base::quote(TRUE)) 79: do.call(FUN, args, quote = TRUE) 80: checkArgsAndCall(panel, pargs) 81: printFunction(x, ...) 82: print.trellis(x) 83: (function (x, ...) UseMethod("print"))(x) 84: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 85: drawDetails.dlgrob(x, recording = FALSE) 86: drawDetails(x, recording = FALSE) 87: drawGrob(x) 88: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 89: grid.draw.grob(x$children[[i]], recording = FALSE) 90: grid.draw(x$children[[i]], recording = FALSE) 91: drawGTree(x) 92: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 93: grid.draw.gTree(x$children[[i]], recording = FALSE) 94: grid.draw(x$children[[i]], recording = FALSE) 95: drawGTree(x) 96: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 97: grid.draw.gTree(gtable) 98: grid.draw(gtable) 99: print.ggplot(p, newpage = FALSE) 100: print(p, newpage = FALSE) 101: dlcompare(list(ggrat), pfuns, rects = FALSE, row.items = "posfuns") 102: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 103: drawDetails.dlgrob(x, recording = FALSE) 104: drawDetails(x, recording = FALSE) 105: drawGrob(x) 106: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 107: grid.draw.grob(g) 108: grid.draw(g) 109: panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...) 110: (function (panel.groups = paste("panel.", lattice.fun.name, sep = ""), ...) { panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...)})(x = base::quote(c(11.7, 18.1, 26.9, 41, 66, 8.7, 11.7, 20.3, 30.9, 54.3, 15.4, 24.3, 37, 54.6, 71.1, 8.4, 13.6, 19.3, 35.1, 50)), y = base::quote(c(1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L, 1L, 2L, 3L, 4L, 5L)), subscripts = base::quote(1:20), type = base::quote("o"), box.ratio = base::quote(1), horizontal = base::quote(TRUE), groups = base::quote(c(1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L)), debug = base::quote(TRUE)) 111: do.call(FUN, args, quote = TRUE) 112: checkArgsAndCall(panel, pargs) 113: printFunction(x, ...) 114: print.trellis(x) 115: (function (x, ...) UseMethod("print"))(x) 116: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 117: drawDetails.dlgrob(x, recording = FALSE) 118: drawDetails(x, recording = FALSE) 119: drawGrob(x) 120: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 121: grid.draw.grob(g) 122: grid.draw(g) 123: panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...) 124: (function (panel.groups = paste("panel.", lattice.fun.name, sep = ""), ...) { panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...)})(x = base::quote(c(28.9560315734707, 29.0758511395194, 31.0757653649896, 30.0219602492638, 25.971849763114, 25.9810880251229, 26.9225773035549, 26.0313415776007, 25.1641481216997, 27.8570416328497, 26.966019050125, 24.8843703002669, 24.9715001483448, 24.8530759900808, 24.9840385783464, 24.177182823699, 25.104789544642, 23.1731639315374, 19.9882713990286, 15.0414352270775, 19.9939958722331, 16.8435225266032, 16.8990907331929, 25.9994058122858, 22.9491466832347, 26.1738765480928, 25.009594431147, 23.9268578686751, 18.9111864117905, 14.1150162030943, 15.0809850050136, 16.8660110554658, 26.8257830155082, 30.1018822486512, 26.0481640132144, 28.8678307066672, 25.8248856209219, 23.8436117074452, 23.9526865406893, 21.8677243658341, 21.9194610168226, 23.8768838140182, 23.9028680085205, 16.8724927291274, 21.9909254838713, 21.1082948171534, 22.8111148489639, 23.010924310796, 19.1521276275627, 17.949225348793, 16.8191836526617, 16.8554512986913, 18.9285968481563, 18.8619326445274, 11.8528912688605, 16.888522371091, 14.8905523184687, 16.8525666135363, 17.1926253841259, 11.9308054907247, 17.0027757988311, 16.0725770059042, 17.8396676412784, 14.8475610232912, 15.8201758638024, 12.1717015678994, 17.0694848931395, 16.8379431421869, 15.9970384483226, 11.98462073626, 14.9500866123475, 16.1964396878146, 16.870540285483, 15.1253740834072, 16.8273786548525, 16.9601798987016, 17.8564577302895, 16.8773239449598, 19.1365406867117, 17.0879655953497, 18.906884833239, 18.998000657931, 16.8332455591299, 16.941553696245, 17.1876835221425, 16.0498856758699, 16.0658472998999, 16.9249958625995, 14.9622758450918, 17.1984309486113, 26.1420329425484, 25.1814193584025, 26.1249220369384, 24.1128728463314, 20.9071512515657, 22.1048606118187, 23.1945246356539, 21.9174422196113, 19.9597404427826, 33.1248526095413, 31.8308606676757, 31.9454787239432, 28.9770369868726, 31.8626856530085, 34.0328821080737, 36.1880648715422, 36.1957999333739, 28.8705808145925, 26.0168521697633, 26.9537215568125, 30.0704656203277, 30.907717511896, 25.987700376939, 25.8687200329266, 27.9476757849567, 26.0901621090248, 28.9944596417248, 27.8255209866911, 27.1138184919953, 23.9673286543228, 24.1924072339199, 23.9131535823457, 22.1391528598033, 18.8328956923448, 20.1545835002325, 16.988772292342, 11.8436403853819, 18.9333111938089, 18.1349666276947, 13.9107399366796, 15.0348140565678, 18.1346929078922, 17.8284616095945, 15.0811114973389, 17.0795298148878, 15.9855849524029, 17.9747724441811, 17.024870715104, 19.1713932905346, 18.8921865656972, 16.8887255017646, 28.9680863573216, 26.9334083222784, 31.1459230201319, 31.8708778142929, 26.9973274914548, 25.9718853467144, 26.0257055372, 25.0624649262056, 25.1914216251113, 16.8928644593805, 16.8963246384636, 20.1187344335951, 18.1326686860062, 25.8454030825757, 26.1853248065338, 26.8589291598648, 27.857450777106, 25.1700919740833, 25.002814241033, 23.8619404068217, 26.9393208208494, 25.0639284103178, 25.9247089497745, 22.9406293637119, 25.859138282761, 26.0635510436259, 25.8740279858001, 26.1817512547597, 25.159139396809, 27.1774788217619, 25.0894763004966, 26.9481428263709, 20.1124070161022, 19.8044598034583, 19.176123484876, 17.1974996904843, 19.9429622980766, 17.099054025393, 29.1171636095271, 27.082343602553, 30.9903300154954, 30.9978618104011, 25.9232209795155, 26.0780048985034, 28.1291173222475, 26.9738870562986, 29.0058930611238, 31.065204387065, 30.8572666346096, 25.9377949574962, 25.9623054329306, 26.8341244023293, 30.1730287712999, 33.1353536266834, 35.1517733184621, 37.1742849870585, 34.8289842533879, 14.9515037762001, 18.0151459691115, 19.8420200554654, 20.1206750822254, 22.095856698323, 16.8208596053533, 18.9928678292781, 18.1682071362622, 19.8166113715619, 28.9175967196003, 26.000340194907, 29.0438995740376, 28.9056996198371, 23.96923944382, 43.9466254465282, 29.1770021289587, 25.8494894260541, 28.8280130716972, 29.1857268151827, 28.9770040432923, 28.9481089521199, 22.8680974320509, 23.8216761717573, 44.0631312277168, 41.0312647666782, 29.194840705581, 26.0415169605985, 27.8259799675085, 28.8648436327465, 28.9901591681875, 28.8007731338963, 27.9765836572275, 28.904371894896, 26.1753654981963, 26.0863333134912, 25.8652341913432)), y = base::quote(c(17.9062034652568, 20.9488495598547, 20.0291413453408, 21.1632831159979, 15.880672772415, 18.1593558739871, 18.1778701074421, 18.0643191169947, 16.0516456175596, 19.824714508187, 18.8823898299597, 14.8706227010116, 17.0748091386631, 16.9536414872855, 15.1079365679994, 14.9990796968341, 17.0870474033058, 16.1967624379322, 13.9520140717737, 11.1109780885279, 14.1738820924424, 12.8848570085131, 12.0606695064344, 15.8502220383845, 14.906888267491, 15.9544456370175, 14.8053561332636, 14.952955182828, 14.1478763382882, 10.9361395986751, 10.9928320461884, 14.03982633017, 18.9974165228195, 21.8744870405644, 18.1309493274428, 18.0673866952769, 17.1176959442906, 17.8431774503551, 17.0894843784161, 15.9645097718574, 16.1283785176463, 17.058824077528, 17.1131731049158, 11.0212145246565, 15.0118878320791, 15.1157424926758, 15.8093324809335, 15.9908920260146, 15.0929254954681, 14.077092622593, 12.9910478488542, 14.1444837907329, 13.9752388428897, 13.8979189108126, 8.82827161885798, 10.839786464069, 10.9265086828731, 13.0074537052773, 13.0648020305671, 8.96273207487538, 13.1651503697038, 10.917441349104, 12.9836262905039, 10.932957869675, 12.0603481868282, 8.90320671228692, 12.9914180993102, 13.1065242682584, 11.8336987657472, 9.15012853201479, 10.9356291751377, 11.1357761400752, 12.9386733956635, 10.933509972319, 10.9905404980294, 11.156879334338, 12.1457357882522, 13.9559958173893, 15.110928279534, 14.1842471988872, 12.9738637939095, 13.0850058714859, 12.9599977475591, 13.9301408607513, 14.102834859211, 12.881076902058, 13.084448488988, 12.848676768411, 10.8981954055838, 12.8573217517696, 17.8958517660387, 17.8235737509094, 17.0569153034128, 16.1505076850764, 15.1115658709779, 15.1189235303551, 14.9821097814478, 14.9640336328186, 14.1243480971083, 28.0419733161107, 24.0618895712309, 24.9412789087743, 22.9081040583551, 24.1970736244693, 26.0533973057754, 24.885283254087, 23.851748939231, 20.991247213725, 18.1696297879331, 18.0395043868572, 21.1904682779685, 21.0927170047536, 17.9426907648332, 17.9725894762203, 18.8592846242711, 18.8052310301922, 19.0862264264375, 19.8412736942992, 19.9785137394443, 17.0560404180549, 16.1967354480177, 16.9982374311425, 16.9937398097478, 14.8693769339472, 15.1019283778034, 13.9815581956878, 9.00446791350842, 13.8830180453137, 12.891463257093, 11.0382847985253, 11.0299488793127, 11.830825752113, 11.8142162318341, 11.0571181968786, 11.1714460798539, 11.039236968942, 12.0243602992035, 14.0104110895656, 13.194038089551, 13.003056728933, 13.0731152314693, 21.0406164870597, 18.8955474711023, 22.903266370669, 23.091723849345, 18.9810283325613, 18.8700507073663, 18.0986793078482, 18.8419950561598, 19.1458179796115, 14.0458579886705, 15.0228638155386, 13.9315109276213, 11.9812525781803, 18.0001763890497, 15.872346544452, 17.0118522411212, 17.8301102982834, 15.9111023730598, 17.885079807695, 17.91391619239, 20.1580376411788, 18.9784941293299, 20.1119939559139, 18.1522476139478, 20.9652496838011, 18.8255233922042, 18.9341949966736, 19.089490378648, 19.935046133399, 20.0521656489931, 19.1362458216026, 20.142452665884, 14.9565437124111, 15.9521975542419, 15.1581781703979, 15.0577263051644, 16.0964314594865, 14.0421213786118, 21.1612326445989, 20.9174920620397, 20.8765040439554, 21.1545803773217, 18.0013357942924, 18.1508230172098, 18.8756774489768, 21.1032412209548, 21.0897995570675, 21.1774899273179, 22.0190586348064, 18.0846975470893, 17.9555620399304, 17.8403492504731, 24.1709208354354, 23.9132930001244, 26.0362292635255, 27.8441442419775, 26.1362028128468, 10.9271854737774, 13.1131405347958, 14.9070032829419, 15.8874581139535, 17.0067187345587, 14.9075802368112, 14.8724673309363, 15.0074304549955, 16.0251131743193, 20.8516627417877, 18.9025470416062, 21.087174110394, 22.1845639745705, 16.8400563386269, 33.105289075803, 21.1791865418665, 19.1274538753554, 21.9233169322833, 21.0598317841999, 21.1813421804458, 21.1814930600114, 15.9359916813672, 16.9049896440469, 34.8661815732718, 28.9288672226481, 21.0040500826202, 19.1695873885416, 20.0043838793412, 19.9030485043302, 20.8185843547806, 17.9671425033361, 19.1416006009094, 20.9388922710903, 15.8525769282132, 17.9497947458178, 17.052568091359)), subscripts = base::quote(1:234), groups = base::quote(c("compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "midsize", "midsize", "midsize", "suv", "suv", "suv", "suv", "suv", "2seater", "2seater", "2seater", "2seater", "2seater", "suv", "suv", "suv", "suv", "midsize", "midsize", "midsize", "midsize", "midsize", "minivan", "minivan", "minivan", "minivan", "minivan", "minivan", "minivan", "minivan", "minivan", "minivan", "minivan", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "suv", "compact", "compact", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize", "suv", "suv", "suv", "suv", "midsize", "midsize", "midsize", "midsize", "midsize", "suv", "suv", "suv", "suv", "suv", "suv", "subcompact", "subcompact", "subcompact", "subcompact", "compact", "compact", "compact", "compact", "suv", "suv", "suv", "suv", "suv", "suv", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "suv", "suv", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "pickup", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "compact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "subcompact", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize", "midsize")), debug = base::quote(FALSE)) 125: do.call(FUN, args, quote = TRUE) 126: checkArgsAndCall(panel, pargs) 127: printFunction(x, ...) 128: print.trellis(p, newpage = FALSE) 129: print(p, newpage = FALSE) 130: dlcompare(list(scatter), list("extreme.grid", `+dl.move` = list(extreme.grid, dl.move("suv", 15, 15)))) 131: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 132: drawDetails.dlgrob(x, recording = FALSE) 133: drawDetails(x, recording = FALSE) 134: drawGrob(x) 135: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 136: grid.draw.grob(x$children[[i]], recording = FALSE) 137: grid.draw(x$children[[i]], recording = FALSE) 138: drawGTree(x) 139: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 140: grid.draw.gTree(x$children[[i]], recording = FALSE) 141: grid.draw(x$children[[i]], recording = FALSE) 142: drawGTree(x) 143: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 144: grid.draw.gTree(gtable) 145: grid.draw(gtable) 146: print.ggplot(direct.label(direct.label(rp2, "last.points"), "first.points")) 147: print(direct.label(direct.label(rp2, "last.points"), "first.points")) 148: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 149: drawDetails.dlgrob(x, recording = FALSE) 150: drawDetails(x, recording = FALSE) 151: drawGrob(x) 152: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 153: grid.draw.grob(g) 154: grid.draw(g) 155: panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...) 156: (function (panel.groups = paste("panel.", lattice.fun.name, sep = ""), ...) { panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...)})(x = base::quote(c(1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64)), y = base::quote(c(240, 250, 255, 260, 262, 258, 266, 266, 265, 272, 278, 225, 230, 230, 232, 240, 240, 243, 244, 238, 247, 245, 245, 250, 250, 255, 262, 265, 267, 267, 264, 268, 269, 260, 255, 255, 265, 265, 268, 270, 272, 274, 273, 275, 255, 260, 255, 270, 270, 273, 274, 273, 276, 278, 280, 260, 265, 270, 275, 275, 277, 278, 278, 284, 279, 281, 275, 275, 260, 270, 273, 274, 276, 271, 282, 281, 284, 245, 255, 260, 268, 270, 265, 265, 267, 273, 274, 278)), subscripts = base::quote(1:88), type = base::quote("l"), groups = base::quote(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L)), debug = base::quote(FALSE)) 157: do.call(FUN, args, quote = TRUE) 158: checkArgsAndCall(panel, pargs) 159: printFunction(x, ...) 160: print.trellis(rat.both) 161: print(rat.both) 162: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 163: drawDetails.dlgrob(x, recording = FALSE) 164: drawDetails(x, recording = FALSE) 165: drawGrob(x) 166: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 167: grid.draw.grob(g) 168: grid.draw(g) 169: panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...) 170: (function (panel.groups = paste("panel.", lattice.fun.name, sep = ""), ...) { panel.superpose.dl(panel.groups = panel.groups, .panel.superpose = old.panel, method = method, ...)})(x = base::quote(c(1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64, 1, 8, 15, 22, 29, 36, 43, 44, 50, 57, 64)), y = base::quote(c(240, 250, 255, 260, 262, 258, 266, 266, 265, 272, 278, 225, 230, 230, 232, 240, 240, 243, 244, 238, 247, 245, 245, 250, 250, 255, 262, 265, 267, 267, 264, 268, 269, 260, 255, 255, 265, 265, 268, 270, 272, 274, 273, 275, 255, 260, 255, 270, 270, 273, 274, 273, 276, 278, 280, 260, 265, 270, 275, 275, 277, 278, 278, 284, 279, 281, 275, 275, 260, 270, 273, 274, 276, 271, 282, 281, 284, 245, 255, 260, 268, 270, 265, 265, 267, 273, 274, 278)), subscripts = base::quote(1:88), type = base::quote("l"), groups = base::quote(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 13L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L, 16L)), debug = base::quote(FALSE)) 171: do.call(FUN, args, quote = TRUE) 172: checkArgsAndCall(panel, pargs) 173: printFunction(x, ...) 174: print.trellis(direct.label(ratplot)) 175: print(direct.label(ratplot)) 176: apply.method(x$method, cm.data, debug = x$debug, axes2native = x$axes2native) 177: drawDetails.dlgrob(x, recording = FALSE) 178: drawDetails(x, recording = FALSE) 179: drawGrob(x) 180: recordGraphics(drawGrob(x), list(x = x), getNamespace("grid")) 181: grid.draw.grob(x$children[[i]], recording = FALSE) 182: grid.draw(x$children[[i]], recording = FALSE) 183: drawGTree(x) 184: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 185: grid.draw.gTree(x$children[[i]], recording = FALSE) 186: grid.draw(x$children[[i]], recording = FALSE) 187: drawGTree(x) 188: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid")) 189: grid.draw.gTree(gtable) 190: grid.draw(gtable) 191: print.ggplot(direct.label(scatter)) 192: print(direct.label(scatter)) An irrecoverable exception occurred. R is aborting now ... Segmentation fault * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘ggplot.R’ [11s/11s] [11s/11s] OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 3 WARNINGs, 1 NOTE See ‘/srv/rf/building/build_2021-06-28-17-07/RF_PKG_CHECK/PKGS/directlabels.Rcheck/00check.log’ for details. Run time: 46.1 seconds.

Additional Logs:   00install.out
Thanks to:
Vienna University of Economics and Business Powered By FusionForge