Message-ID: <20050415060814.GA2418@s1x.local>
Date: 2005-04-15T06:08:14Z
From: wolfram at fischer-zim.ch
Subject: function corresponding to map of perl
Is there a function in R that corresponds to the
function ``map'' of perl?
It could be called like:
vector.a <- map( vector.b, FUN, args.for.FUN )
It should execute for each element ele.b of vector.b:
FUN( vector.b, args.for.FUN)
It should return a vector (or data.frame) of the results
of the calls of FUN.
It nearly works using:
apply( data.frame( vector.b ), 1, FUN, args.for.FUN )
But when FUN is called ele.b from vector.b is no known.
Thanks - Wolfram