문제

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