: Bert Gunter <[EMAIL PROTECTED]>
>Subject: Re: [R] Applying user function over a large matrix
>To: "'Ray Brownrigg'" <[EMAIL PROTECTED]>,
>Cc: "'Tony Plate'" <[EMAIL PROTECTED]>
>
>If you can(one dimensional only), try using
EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ray Brownrigg
Sent: Tuesday, April 29, 2008 3:19 PM
To: r-help@r-project.org
Cc: Tony Plate
Subject: Re: [R] Applying user function over a large matrix
In addition to Tony's suggestion, have a look at the following sequence,
which
I
In addition to Tony's suggestion, have a look at the following sequence, which
I suspect is because the call to apply will duplicate your 1.5GB matrix,
whereas the for loop doesn't [I stand to be corrected here].
> x <- matrix(runif(21), 21)
> unix.time({res <- numeric(ncol(x)); for(i in 1:l
It's quite possible that much of the time spent in loess() is setting up the
data (i.e., the formula, terms, model.frame, etc.), and that much of that is
repeated identically for each call to loess(). I would suggest looking at the
code of loess() and work out what arguments it is calling simp
ng the i/o
overhead too?
Original message
>Date: Tue, 29 Apr 2008 16:40:03 -0400
>From: "jim holtman" <[EMAIL PROTECTED]>
>Subject: Re: [R] Applying user function over a large matrix
>To: "Sudipta Sarkar" <[EMAIL PROTECTED]>
>
>Are
oing that? I
> cam across the filehash package but am not sure how to use
> apply over an environment variable. So any help in this
> direction will be most welcome.
> thanks
>
> Original message
> >Date: Tue, 29 Apr 2008 16:05:41 -0400
> >From: "jim hol
Original message
>Date: Tue, 29 Apr 2008 16:05:41 -0400
>From: "jim holtman" <[EMAIL PROTECTED]>
>Subject: Re: [R] Applying user function over a large matrix
>To: "Sudipta Sarkar" <[EMAIL PROTECTED]>
>
>What size machine do you have. A single
Respected R experts,
I am trying to apply a user function that basically calls and
applies the R loess function from stat package over each time
series. I have a large matrix of size 21 X 900 and I need
to apply the loess for each column and hence I have
implemented this separate user function
8 matches
Mail list logo