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)
有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top