s-news
[Top] [All Lists]

vectorising loops

To: s-news@lists.biostat.wustl.edu
Subject: vectorising loops
From: "Arjun Bhandari" <arb.eu@adia.co.ae>
Date: Tue, 26 Nov 2002 09:05:26 +0400
Hi,

I am currently using a for loop to perform the following operation.

matrix1 <- row of names
matrix2 <- columns of data.

for each element in row of names,
assign(matrix1[i],timeseries(matrix2[i],timeDate))

is it possible to use apply and convert this into a vectorised computation
where the loop is over the rows of matrix1 and columns of matrix2.

Best Regards
Arjun Bhandari




********************************************************************************
The contents of this mail are personal opinions of the Author.
ADIA disclaims all responsibility and accepts no liability, whatsoever.
********************************************************************************

<Prev in Thread] Current Thread [Next in Thread>
  • vectorising loops, Arjun Bhandari <=