[R] abline and its objects
kbartz at loyaltymatrix.com
Tue Jun 29 23:22:57 CEST 2004
The problem is that you've instructed R to place lines at the values 91.55,
99.39, 97.04, 92.37 and 88.02, but these values do not correspond to the
user coordinates of the x-axis (which you've specified to be dates).
Luckily, the dates where you need lines are in the rownames of zi. You do
need to convert them to your user coordinates--and that depends on how plot
decides to specify your user coordinates, which hinges on the range of your
full data set (you clipped it).
What's on your x-axis? Do par("usr") when you have one of the plots open and
tell me what R says.
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Laura Holt
Sent: Tuesday, June 29, 2004 2:06 PM
To: r-help at stat.math.ethz.ch
Subject: [R] abline and its objects
Hi R People:
Is there a way to put an abline line for its objects on a plot, please?
I have an its object, ibm2, which runs from the January 2 through May 28.
I plot the data. No Problem.
Now I extract the first day of the month in this fashion.
>zi <- extractIts(ibm2,weekday=T,find="first",period="month")
I would like to put a vertical line at each of the zi values.
I tried creating another its object with NA in all but the zi places. Then
I used lines(test1)
Still nothing happened.
Any suggestions would be much appreciated.
R Version 1.9.1
mailto: lauraholt_983 at hotmail.com
R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide!
More information about the R-help