[R] heplot3d / rgl : example causes R GUI to crash

Michael Friendly friendly at yorku.ca
Wed Feb 10 15:33:29 CET 2010


[Env: Tested under Win Xp, R 2.9.2 and R 2.10.1; sessionInfo() at end]

I've run into a problem with the heplot3d() function in my heplots 
package which causes the R GUI to crash
('R for Windows GUI encountered a problem and needs to close...'). I 
think the problem comes from an
rgl call, but, I can't get a traceback or other information because my R 
session crashes. I've never seen this
behavior before.


The problem occurs *whenever* I try to supply linear hypotheses to be 
displayed along with the model
terms. Here is a small example:

library(heplots)
# Soils data, from car package
soils.mod <- lm(cbind(pH,N,Dens,P,Ca,Mg,K,Na,Conduc) ~ Block + 
Contour*Depth, data=Soils)
Anova(soils.mod)

heplot(soils.mod, variables=c("Ca", "Mg"))
## this works OK
heplot3d(soils.mod, variables=c("Mg", "Ca", "Na"))

## this crashes R, but it draws most of the plot first
heplot3d(soils.mod, variables = c("Mg", "Ca", "Na"), hypotheses = 
"ContourSlope")

## linear.hypothesis does work on this:
 > print(linear.hypothesis(soils.mod, "ContourSlope"), SSP=FALSE)

Multivariate Tests:
Df test stat approx F num Df den Df Pr(>F)
Pillai 1 0.5844882 3.907418 9 25 0.003312 **
Wilks 1 0.4155118 3.907418 9 25 0.003312 **
Hotelling-Lawley 1 1.4066706 3.907418 9 25 0.003312 **
Roy 1 1.4066706 3.907418 9 25 0.003312 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
 >

I would be grateful if someone could (a) confirm that this is a general 
problem, not just my system; (b)
suggest how to determine what is going wrong.

 > sessionInfo()
R version 2.10.1 (2009-12-14)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rgl_0.89 heplots_0.8-11 car_1.2-16
 >

-- 
Michael Friendly     Email: friendly AT yorku DOT ca 
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA



More information about the R-help mailing list