Running examples in ‘aplpack-Ex.R’ failed
The error most likely occurred in:

> ### Name: iconplot
> ### Title: Icon Plots for Visualization of Contingency Tables
> ### Aliases: iconplot
> ### Keywords: graphics
> 
> ### ** Examples
> 
> # HairEyeColor data, grouping by color
> iconplot(HairEyeColor, 
+          grp.color         = 1, 
+          grp.xy            = NULL, 
+          colors            = c("black", "brown", "red", "gold"),
+          icon.space.factor = 0, 
+          icon.aspect       = 2,
+          main = "grouping by color")
> # HairEyeColor data, grouping by color and symbols
> iconplot(HairEyeColor, 
+          grp.icon          = "Sex", 
+          grp.color         = "Hair", 
+          grp.xy            = NULL, 
+          colors            = c("black", "brown", "red", "gold"),
+          icons             = 18:17,
+          icon.frame        = FALSE, 
+          lab.cex           = 0.8, 
+          icon.space.factor = 0, 
+          lab.parallel      = !FALSE,
+          main = "grouping by color and icons")
> # HairEyeColor data, grouping by x and color
> iconplot(HairEyeColor, 
+          grp.xy            = "0 ~ 1", 
+          grp.color         = 2, 
+          colors            = c("black", "brown", "red", "gold"),
+          icon.stack.type   = "tr", 
+          icon.space.factor = c(0, 0.4), 
+          lab.cex           =0.7, 
+          main = "grouping by x and by colors")
> # 2-dim, 1 split in y, 1 split in x, grouping by color
> iconplot(HairEyeColor, 
+          grp.xy          = "1 ~ 3", 
+          grp.color       = 2, 
+          colors          = c("brown", "blue", "brown3", "green"),
+          panel.frame     = FALSE,
+          icon.stack.type = "bl",
+          lab.cex         = 0.7, 
+          main = "grouping by x and y and by colors")
> # 3-dim, 2 splits in x, 1 split in x, margin labs on the right
> iconplot(HairEyeColor, 
+          grp.xy             = "2 ~ 1 + 3 ", 
+          grp.color          = 2, 
+          panel.space.factor = c(0, .1), 
+          panel.margin       = c(.05,.03,.03,.01),
+          icon.stack.type    = "lb", 
+          icon.stack.len     = 7, 
+          icon.frame         = FALSE,
+          icon.space.factor  = .0, 
+          lab.parallel       = c(TRUE, FALSE), 
+          lab.color          = c("lightblue","green"),
+          lab.side           = "br", 
+          lab.boxes          = 0.2, 
+          lab.type           = "compact", 
+          lab.cex            = 0.8, 
+          main = "grouping: 2~1+3 and by color, margin labs variations")
> # 3-dim, 3 splits in y, icon.aspect = NA
> iconplot(HairEyeColor, 
+          grp.xy             = "3 + 2 ~ 1", 
+          grp.color          = 3, 
+          panel.margin       = 0, 
+          panel.space.factor = 0.1, 
+          icon.stack.type    = "lb", 
+          icon.horizontal    = TRUE, 
+          icon.stack.len     = 5, 
+          icon.space.factor  = c(.1, .3), 
+          icon.aspect        = NA, 
+          icon.frame         = FALSE,
+          lab.boxes          = 0.3, 
+          lab.color          = "grey", 
+          lab.side           = "tl",
+          lab.parallel       = TRUE, 
+          lab.cex            = 0.7, 
+          lab.type           = "compact", 
+          main = "grouping: 3 + 2 ~ 1 and by color")
> # 3-dim, plotting characters as icons
> data <- as.table(array(0:23, 2:4))
> iconplot(data, 
+          grp.xy          = 1 + 2 ~ 3, 
+          grp.color       = 3, 
+          grp.icon        = 2,
+          icon.aspect     = 2, 
+          icon.horizontal = TRUE, 
+          icons           = 15:18,
+          icon.stack.type = c("lb", "lt", "rb","rt")[3], 
+          icon.frame      = FALSE,
+          lab.cex         = .6, 
+          lab.type        = "compact", 
+          main = "1+2 ~ 3")
Note: names for dims have been set: Var1 Var2 Var3 !
> # 3-dim contingency table: panels of different sizes, 1 split in y, 2 in x
> # packer numbers
> # 3-dim contingency table: panels of different sizes, 3 splits in y
> #  3-dim contingency table: panels of different sizes 
> # 3-dim contingency table: panels of different sizes, 3 splits in x 
> # comparing iconplot and mosaic plot
> # par(mfrow = 2:1)
> iconplot(HairEyeColor, 
+          grp.xy             = 2 ~ 1 + 3 , 
+          lab.parallel       = c(TRUE, TRUE),
+          colors             = "red", 
+          panel.reverse.y    = TRUE, 
+          panel.prop.to.size = TRUE,
+          icon.space.factor  = 0.5, 
+          icon.aspect        = 2,
+          lab.cex            = .6, 
+          lab.boxes          = 1, 
+          lab.color          = "grey", 
+          # lab.side           = "lt", 
+          panel.margin       = c(0.00,.035,0.0,.050),
+          main = 'HairEyeColor: grp.xy = 2 ~ 1 + 3')
> mosaicplot(HairEyeColor)
> # par(mfrow = c(1,1))
> # relative frequences 
> data <- as.table(Titanic / max(Titanic))
> iconplot(data, 
+          grp.xy             = 1 ~ 2 + 3, 
+          grp.color          = 4, 
+          panel.frame        = FALSE, 
+          panel.space.factor = 0.05, 
+          icon.horizontal    = !TRUE, 
+          icon.space.factor  = 0.103, 
+          icon.stack.type    = "b",
+          icon.aspect        = 0.5,
+          main = "Titanic: relative frequencies", colors = c("black", "green"))
> # negative and fractional cell entries
> # relative differences of expectations, split according sign
> data <- margin.table(Titanic, c(2,1,4)); pT <- prop.table(data)
> eT <- outer(outer(margin.table(pT,1), margin.table(pT,2)), margin.table(pT,3))
> data <- as.table(pT - eT); data <- data / max(data)
> iconplot(data, 
+          grp.xy = Survived + Sex + .sign ~ Class, 
+          grp.color          = ".sign", 
+          panel.frame        = FALSE, 
+          panel.reverse.y    = TRUE, 
+          panel.space.factor = 0.05, 
+          icon.horizontal    = !TRUE, 
+          icon.stack.type    = rep(c("t","b"), 2), 
+          icon.aspect        = 2, 
+          icon.space.factor  = 0.1, 
+          lab.boxes          = 1.2, 
+          lab.color          = "lightgrey",
+          main = "Titanic: difference to expectation")
Note: new dimension '.sign' constructed to separate 
 the absolute values of negative and positive entries!
> # using a foto as icon, rentals of flats in Goettingen 2015/12
> rentels <- 
+  structure(list(Rooms = c(2, 3, 2, 2, 3, 2, 2, 3, 2, NA, 2, 2,            
+  3, 4, 4, NA, 3, 2, 3, 2, 4, 2, 1, 2), qm = c(43.13, 86, 48, 66.62,        
+  76, 49, 59, 97, 45, 87, 46.39, 71, 65, 100, 75, 178, 94.07, 56,           
+  97, 70, 132, 43, 24, 48), Eur = c(365, 480, 480, 660, 500, 410,           
+  440, 1200, 450, 696, 420, 710, 747.5, 1300, 450, 990, 900, 520,           
+  1020, 1005, 924, 610, 375, 420)), class = "data.frame", 
+  row.names = c(NA, 24L)) 
> fname <- system.file("src", "tm1.jpg", package="aplpack") # fname <- "tm1.jpg" 
> print(fname)
[1] "/data/gannet/ripley/R/packages/tests-clang/aplpack.Rcheck/aplpack/src/tm1.jpg"
> iconplot(rentels, 
+          grp.xy              = Eur ~ qm, 
+          vars.to.factors     = c(1, .5, .3),
+          panel.frame         = FALSE, 
+          panel.space.factor  = 0.2,
+          panel.prop.to.size  = 0.7,
+          icons               = fname, 
+          icon.frame          = FALSE, 
+          icon.space.factor   = 0.05,
+          lab.parallel        = c(TRUE, TRUE), 
+          lab.legend          = "cols",
+          main = "rentels of flats in Goettingen 2015/12")
Error in as.table.default(data) : cannot coerce to a table
Calls: iconplot -> as.table -> as.table.default
Execution halted