' of this mailing list thread, "Possible Improvement",
>*has* become true after all --
>
>-- thanks to Henrik !
>
>Martin Maechler
>ETH Zurich
>
>
>
>> On Tue, Mar 13, 2018 at 9:21 AM, Doran, Harold wrote:
>> > Quite possibly, and I¹ll look into that. As
ject' of this mailing list thread, "Possible Improvement",
*has* become true after all --
-- thanks to Henrik !
Martin Maechler
ETH Zurich
> On Tue, Mar 13, 2018 at 9:21 AM, Doran, Harold wrote:
> > Quite possibly, and I’ll look into that. Aside from the work I was doing,
> >
nto that. Aside from the work I was doing,
> however, I wonder if there is a way such that sapply could avoid the overhead
> of having to call the identical function to determine the conditional path.
>
>
>
> From: William Dunlap [mailto:wdun...@tibco.com]
> Sent: Tuesday, Mar
r...@roswellpark.org]
> Sent: Tuesday, March 13, 2018 9:43 AM
> To: Doran, Harold ; 'r-help@r-project.org' <
> r-help@r-project.org>
> Subject: Re: [R] Possible Improvement to sapply
>
>
>
> On 03/13/2018 09:23 AM, Doran, Harold wrote:
> > While wo
, 2018 12:11 PM
> To: Doran, Harold
> Cc: r-help@r-project.org
> Subject: Re: [R] Possible Improvement to sapply
> Wouldn't that change how simplify='array' is handled?
>> str(sapply(1:3, function(x)diag(x,5,2), simplify="array"))
> int
, March 13, 2018 12:14 PM
To: Doran, Harold
Cc: Martin Morgan ; r-help@r-project.org
Subject: Re: [R] Possible Improvement to sapply
Could your code use vapply instead of sapply? vapply forces you to declare the
type and dimensions
of FUN's output and stops if any call to FUN does not matc
You’re right, it sure does. My suggestion causes it to fail when simplify =
‘array’
From: William Dunlap [mailto:wdun...@tibco.com]
Sent: Tuesday, March 13, 2018 12:11 PM
To: Doran, Harold
Cc: r-help@r-project.org
Subject: Re: [R] Possible Improvement to sapply
Wouldn't that chang
Wouldn't that change how simplify='array' is handled?
> str(sapply(1:3, function(x)diag(x,5,2), simplify="array"))
int [1:5, 1:2, 1:3] 1 0 0 0 0 0 1 0 0 0 ...
> str(sapply(1:3, function(x)diag(x,5,2), simplify=TRUE))
int [1:10, 1:3] 1 0 0 0 0 0 1 0 0 0 ...
> str(sapply(1:3, function(x)diag(x,
izable way.
-Original Message-
From: Martin Morgan [mailto:martin.mor...@roswellpark.org]
Sent: Tuesday, March 13, 2018 9:43 AM
To: Doran, Harold ; 'r-help@r-project.org'
Subject: Re: [R] Possible Improvement to sapply
On 03/13/2018 09:23 AM, Doran, Harold wrote:
> While w
On 03/13/2018 09:23 AM, Doran, Harold wrote:
While working with sapply, the documentation states that the simplify argument will yield a vector,
matrix etc "when possible". I was curious how the code actually defined "as
possible" and see this within the function
if (!identical(simplify, FAL
While working with sapply, the documentation states that the simplify argument
will yield a vector, matrix etc "when possible". I was curious how the code
actually defined "as possible" and see this within the function
if (!identical(simplify, FALSE) && length(answer))
This seems superfluous to
11 matches
Mail list logo