Displaying 1 result from an estimated 1 matches for "adgt".
Did you mean:
adg
2010 Apr 28
1
function which saves an image of a dgtMatrix as png
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