Hi,

I'm getting crazy:

This does work:

library(Matrix)
a1<-b1<-c(1,2)
c1<-rnorm(2)
aDgt<-spMatrix(ncol=3,nrow=3,i=a1,j=b1,x=c1)
png("myImage.png")
image(aDgt)
dev.off()

But this doesn't !!!

f<-function(x){
png("myImage.png")
image(x)
dev.off()
}
f(aDgt)

My image is saved as a text file and contains nothing at all !!!
Thanks in advance,

Gildas Mazo

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to