[R] Using apply with more than one matrix
maitra.mbox.ignored at inbox.com
Wed Apr 30 21:15:25 CEST 2014
You could set up a three-dimensional array and then use apply on the
desired dimension (MARGIN in apply language).
On Wed, 30 Apr 2014 17:54:48 +0000 "Waichler, Scott R"
<Scott.Waichler at pnnl.gov> wrote:
> I want to apply a custom function to all the elements of one matrix. The function uses the value in the same i,j in a second matrix. How can I use apply() or similar function to avoid nested loops in i and j?
> Scott Waichler
> Pacific Northwest National Laboratory
> Richland, WA, USA
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Important Notice: This mailbox is ignored: e-mails are set to be
deleted on receipt. Please respond to the mailing list if appropriate.
For those needing to send personal or professional e-mail, please use
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
More information about the R-help