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

2005-11-28 Thread 广
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?



致
礼!


广星
[EMAIL PROTECTED]
  2005-11-28

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

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

2005-11-28 Thread 广
Oops,I got it!

plot(acf(x,plot=false),type=l,col=red)
will be OK!

Thank you very much!

=== 2005-11-28 18:09:03 您在来信中写道:===

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,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

= = = = = = = = = = = = = = = = = = = =


致
礼!
 
 
广星
[EMAIL PROTECTED]
  2005-11-28

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] How can I get the difference seq directly?

2005-11-25 Thread 广
Hi, R-help,
let x-rnorm(1000),
now I want to get a sequence y,which is satisfied with as follow:
 y[1]-x[2]-x[1]
 y[2]-x[3]-x[2]
 
 y[999]-x[1000]-x[999]

Is there a function in R could achieve this requirement directly?

Thank you in advance!





致
礼!


广星
[EMAIL PROTECTED]
  2005-11-26

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] How can I get the difference seq directly?

2005-11-25 Thread 广
Thank you very much.

I have tried as follow:
y-x[2:length[x]]-x[1:(length[x]-1)]

apparently, it is not better than the diff.

Thank you again.
=== 2005-11-26 12:19:32 您在来信中写道:===

?diff

y - diff(x)

HTH,

--sundar

广星 wrote:
 Hi, R-help,
 let x-rnorm(1000),
 now I want to get a sequence y,which is satisfied with as follow:
  y[1]-x[2]-x[1]
  y[2]-x[3]-x[2]
  
  y[999]-x[1000]-x[999]
 
 Is there a function in R could achieve this requirement directly?
 
 Thank you in advance!
 
 
 
  
 
 致
 礼!
  
 
 广星
 [EMAIL PROTECTED]
   2005-11-26
 
 
 
 
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


= = = = = = = = = = = = = = = = = = = =


致
礼!
 
 
广星
[EMAIL PROTECTED]
  2005-11-26

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] How to test a time series fit the Poisson or other process?

2005-11-24 Thread 广
Hi, R-Help,
I am a newbie.
what I concern most recently is the analysis of the time series,
But there are a lot of package in my eyes.
All I want to try is as follow:
How to test whether a time series fit the Poisson or other process in R? 

Thank you very much in advance.

[EMAIL PROTECTED]
  2005-11-25

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] How to plot two different lines with different color with the same plot function?

2005-11-23 Thread 广
Hi,R_Help!
I have done something like this:
x-seq(412,612,1)
plot(x,dpois(x,512),col=blue,type=l)
plot(x,dnorm(x,512,sd=sqrt(512)),col=red,type=l)
And now,I want to plot the two lines in the same picture or with the same 
plot action?
What should I do? 
And any advises?

Thank you in advance!


广星
[EMAIL PROTECTED]
  2005-11-23

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] How to generate the random numbers with the lognormal distribution?

2005-11-17 Thread 广
Hi,R-list!
I am a newbie to the R and what I want to know mostly now is as follow:
Using rnorm(),we could get the random numbers with normal distribution,
but how to generate the random numbers with  the lognormal distribution?

Thank you in advance!

[EMAIL PROTECTED]
  2005-11-18

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html