On 11/1/2005 10:16 AM, Thomas Lumley wrote:
> On Tue, 1 Nov 2005, Duncan Murdoch wrote:
>
>> The version I posted yesterday did indeed mess up when some arguments were
>> unspecified. Here's a revision that seems to work in all the tests I can
>> think of. I also added the SIMPLIFY and USE.NAM
On Tue, 1 Nov 2005, Duncan Murdoch wrote:
> The version I posted yesterday did indeed mess up when some arguments were
> unspecified. Here's a revision that seems to work in all the tests I can
> think of. I also added the SIMPLIFY and USE.NAMES args from mapply to it,
> and a sanity check to
The version I posted yesterday did indeed mess up when some arguments
were unspecified. Here's a revision that seems to work in all the tests
I can think of. I also added the SIMPLIFY and USE.NAMES args from
mapply to it, and a sanity check to the args.
I did notice and work around one buglet
Here's my entry for Vectorize:
Vectorize <- function(FUN, vectorize.args = names(fargs)) {
fargs <- formals(FUN)
dovec <- match(vectorize.args, names(fargs))
FUNV <- function() { # will set the formals below
args <- as.list(match.call())[-1]
args <- lapply(arg
Duncan Murdoch wrote:
> On 10/31/2005 2:15 PM, Tony Plate wrote:
>
>> [snipped comments irrelevant to this post]
>>
>> So, here's a first pass at a general Vectorize() function:
>>
>> Vectorize <- function(FUN, vectorize.args) {
>> if (!all(is.element(vectorize.args, names(formals(FUN)
>>
On 10/31/2005 2:33 PM, Gabor Grothendieck wrote:
> On 10/31/05, Tony Plate <[EMAIL PROTECTED]> wrote:
>>
>> I have to confess I don't really understand how environments work with
>> functions, so I don't know if this Vectorize() function will work in
>> general. What is the appropriate environment
On 10/31/2005 2:15 PM, Tony Plate wrote:
> When I read the preface to The Blue Book (The New S Language, Becker,
> Chambers & Wilks) I see comments along the lines of "high-level
> language", "primary goal of the S environment is to enable and encourage
> good data analysis", etc. While vectori
On Mon, 31 Oct 2005, Liaw, Andy wrote:
>> From: Thomas Lumley
>>
>> On Sun, 30 Oct 2005, Jonathan Rougier wrote:
>>
>>> I'm not sure about this. Perhaps I am a dinosaur, but my feeling is
>>> that if people are writing functions in R that might be subject to
>>> simple operations like outer produ
On 10/31/05, Tony Plate <[EMAIL PROTECTED]> wrote:
>
> I have to confess I don't really understand how environments work with
> functions, so I don't know if this Vectorize() function will work in
> general. What is the appropriate environment for returned value of
> Vectorize()? Is this approach
When I read the preface to The Blue Book (The New S Language, Becker,
Chambers & Wilks) I see comments along the lines of "high-level
language", "primary goal of the S environment is to enable and encourage
good data analysis", etc. While vectorization is a great feature of S
(and R), I don't
> From: Thomas Lumley
>
> On Sun, 30 Oct 2005, Jonathan Rougier wrote:
>
> > I'm not sure about this. Perhaps I am a dinosaur, but my feeling is
> > that if people are writing functions in R that might be subject to
> > simple operations like outer products, then they ought to be writing
> > vec
Thomas Lumley <[EMAIL PROTECTED]> writes:
> On Sun, 30 Oct 2005, Jonathan Rougier wrote:
>
> > I'm not sure about this. Perhaps I am a dinosaur, but my feeling is
> > that if people are writing functions in R that might be subject to
> > simple operations like outer products, then they ought to
On Sun, 30 Oct 2005, Jonathan Rougier wrote:
> I'm not sure about this. Perhaps I am a dinosaur, but my feeling is
> that if people are writing functions in R that might be subject to
> simple operations like outer products, then they ought to be writing
> vectorised functions!
I would agree. H
I'm not sure about this. Perhaps I am a dinosaur, but my feeling is
that if people are writing functions in R that might be subject to
simple operations like outer products, then they ought to be writing
vectorised functions! Maybe it's not possible to hold this line, and
maybe "outer" is not
If the default were changed to VECTORIZED=FALSE then it would
still be functionally compatible with what we have now so all existing
software would continue to run correctly yet would not cause
problems for the unwary. Existing software would not have to be changed
to add VECTORIZED=TRUE except fo
15 matches
Mail list logo