Re: [R] serial subtraction within a vector

2012-09-24 Thread arun
ct: Re: [R] serial subtraction within a vector ?diff HTH, Jorge.- On Mon, Sep 24, 2012 at 9:00 PM, Hermann Norpois wrote: > Hello, > > I have a vector (numeric) v-> c(a,b,c,d,e) and I want to create the vector > n->c(b-a,c-b,d-c,e-d). How can I do that? &

Re: [R] serial subtraction within a vector

2012-09-24 Thread Jorge I Velez
?diff HTH, Jorge.- On Mon, Sep 24, 2012 at 9:00 PM, Hermann Norpois wrote: > Hello, > > I have a vector (numeric) v-> c(a,b,c,d,e) and I want to create the vector > n->c(b-a,c-b,d-c,e-d). How can I do that? > > > Thank you > Hermann > > [[alternative HTML version deleted]] > > _

Re: [R] serial subtraction within a vector

2012-09-24 Thread PIKAL Petr
Hi I suppose you want diff(v) Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Hermann Norpois > Sent: Monday, September 24, 2012 1:01 PM > To: r-help@r-project.org > Subject: [R] serial su

Re: [R] serial subtraction within a vector

2012-09-24 Thread Rui Barradas
Hello, Try diff(v) Hope this helps, Rui Barradas Em 24-09-2012 12:00, Hermann Norpois escreveu: Hello, I have a vector (numeric) v-> c(a,b,c,d,e) and I want to create the vector n->c(b-a,c-b,d-c,e-d). How can I do that? Thank you Hermann [[alternative HTML version deleted]] __

[R] serial subtraction within a vector

2012-09-24 Thread Hermann Norpois
Hello, I have a vector (numeric) v-> c(a,b,c,d,e) and I want to create the vector n->c(b-a,c-b,d-c,e-d). How can I do that? Thank you Hermann [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm