On Sat, 7 Jun 2014 06:48:49 AM Yijia Wang wrote:> Hello everyone,
>
> I'm a beginner on R, and I recently met a paragraph of code that I
don't> quite understand, anyone could nicely offer me some detailed
explanation on> it? Many thanks, and I'll wait on-line. Here is the code:
>
> postscript("SPreturns_tplot.ps",width=6,height=5) # Figure 19.2
> par(mfrow=c(1,1))
> qqplot(SPreturn, qt(grid,df=2.9837),main="t-probability plot,
> df=2.9837",xlab="data",ylab="t-quantiles")
> abline(lm(qt(c(.25,.75),df=2.9837)~quantile(SPreturn,c(.25,.75))))
> graphics.off()
>
> I suppose this to be a plotting process, however, after I run it in
> RStudio, there is no response like plotting, so I can't figure out what
> exactly is this code telling about.
>
Hi Yijia,
The above should create a file named "SPreturns_tplot.ps" in the
working
directory of your R session (use getwd() to find it). You should be able to
see the image using a Postscript display manager like Ghostview - "gs"
in
Linux, GSview in Windows.
Jim