Displaying 20 results from an estimated 20000 matches similar to: "R (development) changes in arith, logic, relop with (0-extent) arrays"
2016 Sep 09
3
R (development) changes in arith, logic, relop with (0-extent) arrays
> Radford Nea:
> > So it may make more sense to move towards consistency in the
> > permissive direction, rather than the restrictive direction.
>
> > That would mean allowing matrix(1,1,1) < (1:2), and maybe also things
> > like matrix(1,2,2)+(1:8).
>
> Martin Maechler:
> That is an interesting idea. Yes, in my view that would
>
2016 Sep 09
0
R (development) changes in arith, logic, relop with (0-extent) arrays
>>>>> Radford Neal <radford at cs.toronto.edu>
>>>>> on Thu, 8 Sep 2016 17:11:18 -0400 writes:
> Regarding Martin Maechler's proposal:
> Arithmetic between length-1 arrays and longer non-arrays had
> silently dropped the array attributes and recycled. This now gives
> a warning and will signal an error in the future, as it
2016 Sep 12
0
R (development) changes in arith, logic, relop with (0-extent) arrays
>>>>> Radford Neal <radford at cs.toronto.edu>
>>>>> on Fri, 9 Sep 2016 10:29:14 -0400 writes:
>> Radford Nea:
>> > So it may make more sense to move towards consistency in the
>> > permissive direction, rather than the restrictive direction.
>>
>> > That would mean allowing matrix(1,1,1) <
2016 Sep 12
1
R (development) changes in arith, logic, relop with (0-extent) arrays
> > But isn't the intent to make it an error later? So I assume we're
> > debating making it an error, not just a warning.
>
> Yes, that's correct.
> But if we have a longish deprecation period (i.e. where there's
> only a warning) all important code should have been adapted
> before it turns to an error
That might be true for
2016 Sep 07
0
R (development) changes in arith, logic, relop with (0-extent) arrays
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 6 Sep 2016 22:26:31 +0200 writes:
> Yesterday, changes to R's development version were committed, relating
> to arithmetic, logic ('&' and '|') and
> comparison/relational ('<', '==') binary operators
> which in NEWS are
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
>>>>> robin hankin <hankin.robin at gmail.com>
>>>>> on Thu, 8 Sep 2016 10:05:21 +1200 writes:
> Martin I'd like to make a comment; I think that R's
> behaviour on 'edge' cases like this is an important thing
> and it's great that you are working on it.
> I make heavy use of zero-extent arrays, chiefly
2016 Sep 06
3
R (development) changes in arith, logic, relop with (0-extent) arrays
Yesterday, changes to R's development version were committed, relating
to arithmetic, logic ('&' and '|') and
comparison/relational ('<', '==') binary operators
which in NEWS are described as
SIGNIFICANT USER-VISIBLE CHANGES:
[.............]
? Arithmetic, logic (?&?, ?|?) and comparison (aka
?relational?, e.g.,
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
Shouldn't binary operators (arithmetic and logical) should throw an error
when one operand is NULL (or other type that doesn't make sense)? This is
a different case than a zero-length operand of a legitimate type. E.g.,
any(x < 0)
should return FALSE if x is number-like and length(x)==0 but give an error
if x is NULL.
I.e., I think the type check should be done before the length
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
On 09/08/2016 01:22 PM, Gabriel Becker wrote:
> On Thu, Sep 8, 2016 at 10:05 AM, William Dunlap <wdunlap at tibco.com> wrote:
>
>> Shouldn't binary operators (arithmetic and logical) should throw an error
>> when one operand is NULL (or other type that doesn't make sense)? This is
>> a different case than a zero-length operand of a legitimate type. E.g.,
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
Prior to the mid-1990s, S did "length-0 OP length-n -> rep(NA, n)" and it
was changed
to "length-0 OP length-n -> length-0" to avoid lots of problems like
any(x<0) being NA
when length(x)==0. Yes, people could code defensively by putting lots of
if(length(x)==0)...
in their code, but that is tedious and error-prone and creates really ugly
code.
Is your suggestion to
2016 Sep 07
0
R (development) changes in arith, logic relop with 0-extent arrays
On 09/07/2016 05:00 AM, r-devel-request at r-project.org wrote:
> I've been slightly surprised (or even "frustrated") by the empty
> reaction on our R-devel list to this post.
>
> I would have expected some critique, may be even some praise,
> ... in any case some sign people are "thinking along" (as we say
> in German).
Have patience Martin. I read the
2016 Sep 09
1
R (development) changes in arith, logic, relop with (0-extent) arrays
Thank you, Gabe and Bill,
for taking up the discussion.
>>>>> William Dunlap <wdunlap at tibco.com>
>>>>> on Thu, 8 Sep 2016 10:45:07 -0700 writes:
> Prior to the mid-1990s, S did "length-0 OP length-n -> rep(NA, n)" and it
> was changed
> to "length-0 OP length-n -> length-0" to avoid lots of problems like
2016 Sep 07
3
R (development) changes in arith, logic, relop with (0-extent) arrays
Martin
I'd like to make a comment; I think that R's behaviour on 'edge' cases like
this is an important thing and it's great that you are working on it.
I make heavy use of zero-extent arrays, chiefly because the dimnames are an
efficient and logical way to keep track of certain types of information.
If I have, for example,
a <- array(0,c(2,0,2))
dimnames(a) <-
2016 Sep 08
2
R (development) changes in arith, logic, relop with (0-extent) arrays
Martin,
Like Robin and Oliver I think this type of edge-case consistency is
important and that it's fantastic that R-core - and you personally - are
willing to tackle some of these "gotcha" behaviors. "Little" stuff like
this really does combine to go a long way to making R better and better.
I do wonder a bit about the
x = 1:2
y = NULL
x < y
case.
Returning a
2016 Sep 08
1
R (development) changes in arith, logic, relop with (0-extent) arrays
Could we take a cue from min() and max()?
> x <- 1:10
> min(x[x>7])
[1] 8
> min(x[x>11])
[1] Inf
Warning message:
In min(x[x > 11]) : no non-missing arguments to min; returning Inf
>
As ?min says, this is implemented to preserve transitivity, and this
makes a lot of sense.
I think the issuing of a warning here is a good compromise; I can
always turn off warnings if I
2016 Sep 08
4
R (development) changes in arith, logic, relop with (0-extent) arrays
On Thu, Sep 8, 2016 at 10:05 AM, William Dunlap <wdunlap at tibco.com> wrote:
> Shouldn't binary operators (arithmetic and logical) should throw an error
> when one operand is NULL (or other type that doesn't make sense)? This is
> a different case than a zero-length operand of a legitimate type. E.g.,
> any(x < 0)
> should return FALSE if x is number-like
2005 Sep 28
3
is it possible to form matrix of matrices...and multiple arrays
Dear sirs,
1...........Kindly tell me is it possible to form a matrix which contains a no of matrices..
for eg..
if a,b,c,d are matrices....
and e is a matrix which contains a,b,c,d as rows and columns..
2..........Is it possible to form array of array of arrays
for eg..
"A" contains two set of arrays (1,2)...and each A[1] and A[2] individually contains two set of arrays
I tried like
2014 Jun 23
2
Unfixed bugs in latest R-patched
A new version of pqR is now available at pqR-project.org, which fixes
several bugs that are also present in the latest R Core patch release
(r66002). A number of bugs found previously during pqR development
are also unfixed in the latest R Core release. Here is the list of
these bugs that are unfixed in r66002 (including documentation
deficiencies), taken from the pqR bug fix and documentation
2010 Jan 12
1
coerce vector into array - change filling sequence
Dear all,
When I coerce a vector into a multi dimensional array, I would like R to start filling the array along the last dimension, then the 2nd last etc.
Let's jump straight into an example.
x <- 1 : 24
y <- array(dim=c(2,2,6))
I would like to have:
y[1,1,1] = 1
y[1,1,2] = 2
...
y[1,1,6] = 6
y[1,2,1] = 7
y[1,2,2] = 8
...
y[2,1,1] = 13
...
y[2,2,1] = 19
if I do y<- array(x,
2015 Jun 17
1
Add-on argument in sample()
> Then the question would be if this test could be replaced with a new
> argument to sample, e.g. expandSingle, which has TRUE as default for
> backward compatibility, but FALSE if you dont want population to be
> expanded to 1:population. It could certainly be useful in some cases,
> but you still need to know about the expansion to use it. I think most
> of these bugs