Вопрос

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