On Mon, 2008-02-25 at 11:52 +1000, [EMAIL PROTECTED] wrote:
> x <- x/rep(divs, each = 1000)
Fantastic :)
Thanks Bill, Andrew and Rolf
Andre
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting g
How about
x <- x / rep(divs, rep(1000, 1000))
?
Cheers,
Andrew
On Sun, Feb 24, 2008 at 10:36:23PM -0300, Andre Nathan wrote:
> Hello,
>
> I have a vector of 1,000,000 numbers and another vector of 1,000
> divisors. What I'd like to do is to divide the first 1,000 numbers of
> the first vecto
700
mailto:[EMAIL PROTECTED]
http://www.cmis.csiro.au/bill.venables/
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Andre Nathan
Sent: Monday, 25 February 2008 11:36 AM
To: r-help@r-project.org
Subject: [R] A more idiomatic way to write this
Hello,
I hav
x/rep(divs,each=1000)
cheers,
Rolf Turner
On 25/02/2008, at 2:36 PM, Andre Nathan wrote:
> Hello,
>
> I have a vector of 1,000,000 numbers and another vector of 1,000
> divisors. What I'd like to do is to divide the first 1,000 numbers of
> the first vector by the first
Hello,
I have a vector of 1,000,000 numbers and another vector of 1,000
divisors. What I'd like to do is to divide the first 1,000 numbers of
the first vector by the first divisor, then the next 1,000 by the second
divisor and so on. I came up with this, but I was wondering if there is
a more idio
5 matches
Mail list logo