[R] labelling of horizontal axis in acf function

Leeds, Mark (IED) Mark.Leeds at morganstanley.com
Sun Oct 29 02:16:12 CEST 2006


thanks gabor. It's appreciated. Another question to you and anyone else
who might be out there :

My version of R is :

platform       i686-pc-linux-gnu         
arch           i686                      
os             linux-gnu                 
system         i686, linux-gnu           
status                                   
major          2                         
minor          3.1                       
year           2006                      
month          06                        
day            01                        
svn rev        38247                     
language       R                         
version.string Version 2.3.1 (2006-06-01)

And tonight was the first time I tried to run two interactive versions
of R at the same time ( on two different machines but I
Don't know if that matters. I can log into various machines ) :

An erroroccurs during the loading of my First.R  function in the second
R session and it says 

Error in dyn.load(x, as.logical(local), as.logical(now)) : 
        unable to load shared library
'/u/etlfs/dev/users/leedsmar/res/R/lib/chron/libs/chron.so':
  /lib/i686/libc.so.6: version `GLIBC_2.3' not found (required by
/u/etlfs/dev/users/leedsmar/res/R/lib/chron/libs/chron.so)
Error: package/namespace load failed for 'chron'

But this is the first time this has ever happened so I'm thinking that
it must be due to trying to run two versions of R at the
Same time. The session does come up there but obviously my chron and
other libraries after that didn't get loaded.
Maybe it's not possible to use loibraries at the same time in two
different R sessions  but I think I used to do this
Atleast when I used R in windows before. Thanks.








-----Original Message-----
From: Gabor Grothendieck [mailto:ggrothendieck at gmail.com] 
Sent: Saturday, October 28, 2006 7:38 PM
To: Leeds, Mark (IED)
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] labelling of horizontal axis in acf function

Its because of the frequency.  The lower the frequency number the higher
will be the numbers on the scale axis.

> as.ts(aggfxdata[,"bid"])
Time Series:
Start = 1144713660
End = 1144716960
Frequency = 0.0166666666666667
 [1] 118.4800       NA 118.4760       NA 118.4600 118.4367 118.4171
118.3810
 [9] 118.3800 118.3689 118.3733 118.3600 118.3286 118.3471 118.3507
118.3667
[17] 118.3729 118.3700 118.3658 118.3383 118.3486       NA 118.3600
118.3600
[25] 118.3600 118.3633       NA 118.3600       NA 118.3575 118.3600
118.3850
[33] 118.4087 118.3980 118.4000 118.4014 118.4100 118.4029 118.3946
118.4000
[41]       NA 118.4117 118.4108 118.4120 118.4087 118.4050 118.4157
118.4310
[49] 118.4407 118.4400 118.4240 118.4300 118.4250 118.4200 118.4150
118.4300

On 10/28/06, Leeds, Mark (IED) <Mark.Leeds at morganstanley.com> wrote:
> this one is not a false alarm like my previous message.
>
> i have cut and paste the code below so if anyone could run it would be

> appreciated. basically, my question is why the horizontal axis of the 
> acf plot is labelled with such huge numbers when the labels should be 
> 1 through 10 since may lag.max = 10 ?
>
> i looked at the cdoe of acf but it was pretty much beyond me. i think 
> it has something to do with the way the  lag.max variable in the acf 
> function is getting calculated.
>
> if i do aggfxdata<-as.ts(aggfxdata) before the call to acf, the same 
> thing happens so the problem is not caused by the fact that aggfxdata 
> is  a zoo object. it's not such a big deal because i know the lags are

> actually 1 thoruh 10 but if someone knows how to get them outputted on

> the horizontal axis of the acf plot, that would be great. thanks.
>
> also, just in case people are wondering , the aggfxdata structure 
> below has been aggregated so that there are no duplicates so this is 
> not the problem either.
>
> again, you would need the zoo and chron libraries installed for the 
> code below to run.
>
> #---------------------------------------------------------------------
> --
> ----------------------------------------------------------------------
> --
> ---------------------------------
>
> aggfxdata<-structure(c(118.48, 118.476, 118.46, 118.436666666667, 
> 118.417142857143, 118.381, 118.38, 118.368888888889, 118.373333333333,

> 118.36, 118.328571428571, 118.347142857143, 118.350714285714, 
> 118.366666666667, 118.372857142857, 118.37, 118.365833333333, 
> 118.338333333333, 118.348571428571, 118.36, 118.36, 118.36, 
> 118.363333333333, 118.36, 118.3575, 118.36, 118.385, 118.40875, 
> 118.398, 118.4, 118.401428571429, 118.41, 118.402857142857, 
> 118.394615384615, 118.4, 118.411666666667, 118.410833333333, 118.412, 
> 118.40875, 118.405, 118.415714285714, 118.431, 118.440666666667, 
> 118.44, 118.424, 118.43, 118.425, 118.42, 118.415, 118.43, 118.49, 
> 118.486, 118.47, 118.453333333333, 118.43, 118.3965, 118.393333333333,

> 118.387777777778, 118.388333333333, 118.374615384615, 
> 118.344285714286, 118.361428571429, 118.365, 118.38, 118.387142857143,

> 118.385, 118.378333333333, 118.353333333333, 118.364285714286, 
> 118.375, 118.373333333333, 118.375, 118.378333333333, 118.37, 
> 118.3775, 118.38, 118.3975, 118.41875, 118.41, 118.415, 
> 118.418571428571, 118.421666666667, 118.415714285714, 
> 118.403076923077, 118.42, 118.426666666667, 118.4275, 118.426, 
> 118.42625, 118.42, 118.428571428571, 118.45, 118.457333333333, 
> 118.4575, 118.44, 118.44, 118.44, 118.44, 118.44, 118.44), .Dim = 
> c(50, 2), .Dimnames = list(
>    c("1144713660", "1144713780", "1144713900", "1144713960",
>    "1144714020", "1144714080", "1144714140", "1144714200", 
> "1144714260",
>    "1144714320", "1144714380", "1144714440", "1144714500", 
> "1144714560",
>    "1144714620", "1144714680", "1144714740", "1144714800", 
> "1144714860",
>    "1144714980", "1144715040", "1144715100", "1144715160", 
> "1144715280",
>    "1144715400", "1144715460", "1144715520", "1144715580", 
> "1144715640",
>    "1144715700", "1144715760", "1144715820", "1144715880", 
> "1144715940",
>    "1144716000", "1144716120", "1144716180", "1144716240", 
> "1144716300",
>    "1144716360", "1144716420", "1144716480", "1144716540", 
> "1144716600",
>    "1144716660", "1144716720", "1144716780", "1144716840", 
> "1144716900",
>    "1144716960"), c("bid", "ask")), index = structure(c(1144713660, 
> 1144713780, 1144713900, 1144713960, 1144714020, 1144714080, 
> 1144714140, 1144714200, 1144714260, 1144714320, 1144714380, 
> 1144714440, 1144714500, 1144714560, 1144714620, 1144714680, 
> 1144714740, 1144714800, 1144714860, 1144714980, 1144715040, 
> 1144715100, 1144715160, 1144715280, 1144715400, 1144715460, 
> 1144715520, 1144715580, 1144715640, 1144715700, 1144715760, 
> 1144715820, 1144715880, 1144715940, 1144716000, 1144716120, 
> 1144716180, 1144716240, 1144716300, 1144716360, 1144716420, 
> 1144716480, 1144716540, 1144716600, 1144716660, 1144716720, 
> 1144716780, 1144716840, 1144716900, 1144716960), class = c("POSIXt", 
> "POSIXct")), class = "zoo")
>
> acf(aggfxdata[,"bid"],lag.max=10,plot=TRUE,na.action=na.pass)
>
>
> #---------------------------------------------------------------------
> --
> ----------------------------------------------------------------------
> --
> --------------------------------------------
> --------------------------------------------------------
>
> This is not an offer (or solicitation of an offer) to buy/sell the 
> securities/instruments mentioned or an official confirmation.  Morgan 
> Stanley may deal as principal in or own or act as market maker for 
> securities/instruments mentioned or may advise the issuers.  This is 
> not research and is not from MS Research but it may refer to a 
> research analyst/research report.  Unless indicated, these views are 
> the author's and may differ from those of Morgan Stanley research or 
> others in the Firm.  We do not represent this is accurate or complete 
> and we may not update this.  Past performance is not indicative of 
> future returns.  For additional information, research reports and 
> important disclosures, contact me or see 
> https://secure.ms.com/servlet/cls.  You should not use e-mail to 
> request, authorize or effect the purchase or sale of any security or 
> instrument, to send transfer instructions, or to effect any other 
> transactions.  We cannot guarantee that any such requests received via
  !
>  e-mail will be processed in a timely manner.  This communication is
solely for the addressee(s) and may contain confidential information.
We do not waive confidentiality by mistransmission.  Contact me if you
do not wish to receive these communications.  In the UK, this
communication is directed in the UK to those persons who are market
counterparties or intermediate customers (as defined in the UK Financial
Services Authority's rules).
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>
--------------------------------------------------------

This is not an offer (or solicitation of an offer) to buy/se...{{dropped}}



More information about the R-help mailing list