[R] RSvgDevice & sapply(plotmeans)

Christian Schulz ozric at web.de
Fri Dec 27 11:25:03 CET 2002


Hi,
anybody know why this not works for several
plots ?
When i set onefile=T the plots are stacked one about another
, onefile=F only the first plot is shown in AllbusMeansPlots.svg.
[h2 is a data.frame]
......hist and sapply works for several plots  nice with RSvgDevice !
Maybe setting the title after apply is a problem, but until yet i didn't
found a better solution ?

library(RSvgDevice)
library(gregmisc)
devSVG(file = "AllbusMeanPlots.svg", width = 10, height = 8,
       bg = "lightblue", fg = "white", onefile=T, xmlHeader=TRUE)
#par(bg="lightblue",ann=T)
plt <- function(x) {
   plotmeans(h2[,x] ~
h2$V174,ylab=names(h2)[x],xlab="InglehartIndex",mean.labels=T,
   connect=list(1:2,3:4,4:5),ccol="red",pch=7,barwidth=1,barcol="black")
   title("Mittelwert-Plots Allbus 1998")
   }
sapply((2:ncol(h2)),plt)
dev.off()


Thanks for advance
christian




More information about the R-help mailing list