[R] How Can I change the acf's plot type?

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Nov 28 11:09:03 CET 2005


On Mon, 28 Nov 2005, [gb2312] ¹ãÐÇ wrote:

> In the R Document, the usage of the acf() is as  follow:
>  acf(x, lag.max = NULL,
>    type = c("correlation", "covariance", "partial"),
>    plot = TRUE, na.action = na.fail, demean = TRUE, ...)
> But now I want to get the result picture like:
> plot(x,type="l")
> or
> plot(x,type="p")
> How can I do this with acf function?

From the very same help page

      The generic function 'plot' has a method for objects of class
      '"acf"'.

so use that directly: it has a 'type' parameter.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


More information about the R-help mailing list