Re: [R] Fwd: Segment out of the Graph

2011-08-26 Thread Claudio Zanettini
Zanettini wrote: -- Forwarded message -- From: Claudio Zanettini lt;claudio.zanettini@gmail.**comlt%3bclaudio.zanett...@gmail.com gt; Date: 2011/8/25 Subject: Re: [R] Segment out of the Graph To: David Winsemius lt;dwinsem...@comcast.netgt; Thanks David and Michael

Re: [R] Append a value to a vector

2011-08-25 Thread Claudio Zanettini
Oh thanks, yes now I understand. I did not realized that I did not save it. :) 2011/8/24 Jean V Adams jvad...@usgs.gov Claudio Zanettini claudio.zanett...@gmail.com wrote on 08/24/2011 04:33:50 PM: Thank you, this work fine, and is not contorted like mine:) In this case lastV=LastI

[R] Segment out of the Graph

2011-08-25 Thread Claudio Zanettini
Hello everyone, I have a graph and a segment parallel to the x axis at y=-10, x=0, and bars on it. Now the question is, Is there a way to leave the segment there but let the graph axis start from the origin? In this way the segment will be out of the graph Thanks [[alternative HTML

Re: [R] Segment out of the Graph

2011-08-25 Thread Claudio Zanettini
Yes I tried but if I set the lim to 0 then it will not displayed the line that is at -10, right? 2011/8/25 R. Michael Weylandt michael.weyla...@gmail.com Look at ylim, as an optional argument to plot. Michael On Thu, Aug 25, 2011 at 1:07 PM, Claudio Zanettini claudio.zanett...@gmail.com

Re: [R] Segment out of the Graph

2011-08-25 Thread Claudio Zanettini
(-5,11); layout(1:2) plot(x,y,type=b); lines(x,z,col=2) plot(x,y,ylim = c(-8,max(y)+3),type=b); lines(x,z,col=2) For your work, you'd need ylim = c(0, 1.03*max(y)) or something similar. Michael Weylandt On Thu, Aug 25, 2011 at 1:12 PM, Claudio Zanettini claudio.zanett...@gmail.com wrote

[R] Fwd: Segment out of the Graph

2011-08-25 Thread Claudio Zanettini
-- Forwarded message -- From: Claudio Zanettini claudio.zanett...@gmail.com Date: 2011/8/25 Subject: Re: [R] Segment out of the Graph To: David Winsemius dwinsem...@comcast.net Thanks David and Michael, In attachment there is one of the graph. the line below the graph

[R] Append a value to a vector

2011-08-24 Thread Claudio Zanettini
This should be easy but it does not work I have 3 vectors*(activeT,inactT, activeR)*, the idea is that if the last value in inactT is higher than the last in activeT this value has to be append in active T and the last value in another vector call activeR has to be repeated. (at the bottom you can

Re: [R] Append a value to a vector

2011-08-24 Thread Claudio Zanettini
lastA activeT activeR if(lastI lastA) { activeT - c(activeT, lastI) activeR - c(activeR, tail(activeR,1)) } activeT activeR By the way, it's helpful to others if you cc r-help@r-project.org in any replies to keep the thread going. Jean Claudio Zanettini

[R] Sequence

2011-08-22 Thread Claudio Zanettini
Hello everyone, I would like to generate a sequence such as, starting from 5, every value is 40% of the value before+ all the preceeding values. es: this is the seq of all the value+40% of the preceding value: 5 71014192738 5374 103

Re: [R] Sequence

2011-08-22 Thread Claudio Zanettini
Thanks guys, I did not know the fun cumsum I will work on that. HVZ 2011/8/22 David Winsemius dwinsem...@comcast.net On Aug 22, 2011, at 8:36 PM, Claudio Zanettini wrote: Hello everyone, I would like to generate a sequence such as, starting from 5, every value is 40% of the value

Re: [R] Sequence

2011-08-22 Thread Claudio Zanettini
, 2011 at 8:36 PM, Claudio Zanettini wrote: Hello everyone, I would like to generate a sequence such as, starting from 5, every value is 40% of the value before+ all the preceeding values. es: this is the seq of all the value+40% of the preceding value: 5 71014