Dear users,
I have already sent this email last week, but haven't received an
answer. So here is my second try.
By running the script below, R crashes systematically at the last
command, namely dev.off(), on Windows 7, but not on Windows XP.
I therefore don't provide a reproducible example and do not really
extract the relevant parts of the script because it has most likely
nothing to do with the script itself. I can do it though if you think it
might be relevant.
R crashes on Windows 7, sessionInfo():
R version 2.13.1 (2011-07-08)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] splines stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] doBy_4.4.0 MASS_7.3-13 snow_0.3-7
lme4_0.999375-41
[5] Matrix_0.9996875-3 lattice_0.19-30 multcomp_1.2-7
mvtnorm_0.9-9991
[9] R2HTML_2.2 survival_2.36-9 RSvgDevice_0.6.4.1 R.utils_1.7.8
[13] R.oo_1.8.1 R.methodsS3_1.2.1
loaded via a namespace (and not attached):
[1] grid_2.13.1 nlme_3.1-101 stats4_2.13.1
But it works perfectly on Windows XP, sessionInfo():
R version 2.13.1 (2011-07-08)
Platform: i386-pc-mingw32/i386 (32-bit)
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] splines stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] doBy_4.4.0 MASS_7.3-14 snow_0.3-6
lme4_0.999375-41
[5] Matrix_0.9996875-3 lattice_0.19-33 multcomp_1.2-7
mvtnorm_0.9-9991
[9] R2HTML_2.2 survival_2.36-9 RSvgDevice_0.6.4.1 R.utils_1.7.8
[13] R.oo_1.8.1 R.methodsS3_1.2.1
loaded via a namespace (and not attached):
[1] grid_2.13.1 nlme_3.1-102 stats4_2.13.1
Except the locale, I don't see any difference and I don't really
understand how that would make R crash by running dev.off(). I would
guess that the problem comes from RSvgDevice on Windows 7. Can someone
help me to solve this issue?
Thank you for your help,
Ivan
-------- script ---------
library(R.utils)
library(RSvgDevice)
library(doBy)
primate_med <- loadObject("primate_med.Rbin")
select <- primate_med
seq.yvar <- c(5,12,8,9)
ind.xvar <- 4
filename <- paste("regression", names(datobj)[ind.xvar],
paste(names(datobj)[seq.yvar],collapse="_"),
paste(selvarstr,collapse="_"), sep="_") filename <-
gsub(".median", "",
filename)
select_mean <-
summaryBy(as.formula(paste(".~",names(select)[ind.xvar])),
data=select,
FUN=mean)
devSVG(file=paste(filename, ".svg", sep=""))
par(mfrow=c(2,2))
diff_len <- length(select)-length(select_mean)
for (i in seq_along(seq.yvar)){
k <- seq.yvar[i]
plot(select[[k]]~select[[ind.xvar]], type="p", pch=1,
xlab=names(select)[ind.xvar], ylab=names(select)[k], las=1)
points(select_mean[[ind.xvar-diff_len]], select_mean[[k-diff_len]],
pch=18, cex=2)
two_reg(dat=select, xvar=ind.xvar, yvar=k)
}
dev.off()
-------------------------
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Dept. Mammalogy
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php