Domanda

I save a file using Tinn R and try to open it in rampant logic postscript viewer 1.1 but it is opening in word pad. I am unable to understand the problem. My code is given below

library(MASS)
attach(cats)
#print(cats)
#names(cats)
#summary(cats)
postscript("asd.ps",horizontal=F)
par(mfrow=c(2,2))
boxplot(cats[,2:3])
plot(Bwt,Hwt)
È stato utile?

Soluzione

You need to close the device before R finalises the file (and before it even draws on the device), e.g.

postscript("asd.ps", horizontal=FALSE)
op <- par(mfrow=c(2,2))
boxplot(cats[,2:3])
plot(Bwt, Hwt)
par(op)
dev.off() ## close the device

Once you've dealt with that, make sure .ps files are associated with the Rampant Logic viewer rather than with Wordpad. IIRC, .ps default to being handled by Wordpad (at least they did the last time I used Windows...)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top