Frage

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)
War es hilfreich?

Lösung

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...)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top