Skip to content
Prev 277387 / 398506 Next

mapply then export

Perhaps something like:

sapply(1:40, function(n) c(gauss.quad(n)$nodes, rep(NA, 40-n)))
sapply(1:40, function(n) c(gauss.quad(n)$weights, rep(NA, 40-n)))

You'll have to decide how you want the records combined but this
should get you going in the right direction

Michael

PS -- it's polite to say what package your functions are coming from
so we don't have to hunt them down. Also, it's much more helpful to
have code that doesn't work rather than the vague "I've tried using
mapply but ..." because it allows us to give you pointers that relate
directly to your problem (and to your general coding style if there's
anything that can be cleaned up there -- there are some real R ninjas
on this list and I love watching their tricks)

On Mon, Nov 14, 2011 at 6:51 PM, RisConfusingMe
<derrick.kaufman at gmail.com> wrote: