2013-04-27 29 views
1

我使用Tinn R保存文件,並嘗試在猖獗的邏輯postscript查看器1.1中打開它,但它在word pad中打開。我無法理解這個問題。下面如何在猖獗的邏輯postscript查看器中打開R文件?

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) 
+1

沒有'dev.off()',您的PostScript文件可能不完整。 – 2013-04-27 15:49:51

回答

2

您需要關閉器械研發定型前的文件(之前它甚至在設備上平),例如我的代碼給出

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 

一旦你處理的是,確保.ps文件與猖獗的邏輯觀衆,而不是用寫字板關聯。 IIRC,.ps默認由寫字板處理(至少他們做了上次我使用Windows ...)

相關問題