Message-ID: <6E8D8DFDE5FA5D4ABCB8508389D1BF88D49357@SRVEXCHMBX.precheza.cz>
Date: 2012-09-24T12:25:07Z
From: PIKAL Petr
Subject: serial subtraction within a vector
In-Reply-To: <CAKyZeBucLm0-WXM++wPLBaXKDF6AL4fq583M6nkrXRUoBjbNoQ@mail.gmail.com>
Hi
I suppose you want
diff(v)
Regards
Petr
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Hermann Norpois
> Sent: Monday, September 24, 2012 1:01 PM
> To: r-help at r-project.org
> Subject: [R] serial subtraction within a vector
>
> 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 at r-project.org 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.