On 2007-12-21, Louis Martin <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am running the following loop, but it takes hours to run as n is big. Is
> there any way "apply" can be used? Thanks.
> ### Start
> nclass <- dim(data)[[2]] - 1
> z <- matrix(0, ncol = nclass, nrow = nclass)
> n <- dim(
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Louis Martin
Sent: Friday, 21 December 2007 11:37 AM
To: R-help@r-project.org
Subject: [R] using apply to loop
Hi,
I am running the following loop, but it takes hours to run as n is big.
Is there any way "apply" can be u
Hi,
I am running the following loop, but it takes hours to run as n is big. Is
there any way "apply" can be used? Thanks.
### Start
nclass <- dim(data)[[2]] - 1
z <- matrix(0, ncol = nclass, nrow = nclass)
n <- dim(data)[[1]]
x <- c(1:nclass)
# loop starts
for(loop in 1:n) {
3 matches
Mail list logo