Displaying 20 results from an estimated 35 matches for "asserterror".
2016 Sep 06
3
R (development) changes in arith, logic, relop with (0-extent) arrays
...--------
## special case for arithmetic w/ length-1 array
(m1 <- matrix(1,1,1, dimnames=list("Ro","col")))
(m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not match the length of object [2]
tools::assertError(m1 < 1:2)# ERR: (ditto)
##
## non-0-length arrays combined with {NULL or double() or ...} *fail*
### Length-1 arrays: Arithmetic with |vectors| > 1 treated array as scalar
m1 + NU...
2016 Sep 07
3
R (development) changes in arith, logic, relop with (0-extent) arrays
...t; > (m1 <- matrix(1,1,1, dimnames=list("Ro","col")))
> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
>
> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not match the
> length of object [2]
> > tools::assertError(m1 < 1:2)# ERR: (ditto)
> > ##
> > ## non-0-length arrays combined with {NULL or double() or ...} *fail*
>
> > ### Length-1 arrays:...
2016 Sep 08
2
R (development) changes in arith, logic, relop with (0-extent) arrays
...ames=list("Ro","col")))
> >> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
> >>
> >> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
> >> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not match
> the
> >> length of object [2]
> >> > tools::assertError(m1 < 1:2)# ERR: (ditto)
> >> > ##
> >> > ## non-0-length arrays combined with {NULL or double() or ...}
>...
2016 Sep 07
0
R (development) changes in arith, logic, relop with (0-extent) arrays
...tic w/ length-1 array
> (m1 <- matrix(1,1,1, dimnames=list("Ro","col")))
> (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
> m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
> tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not match the length of object [2]
> tools::assertError(m1 < 1:2)# ERR: (ditto)
> ##
> ## non-0-length arrays combined with {NULL or double() or ...} *fail*
> ### Length-1 arrays: Arithmetic with |vectors| >...
2017 May 17
2
R-3.4.0 fails test
After installing R-3.4.0 I ran 'make check' which halted here:
$ > tail reg-tests-1d.Rout.fail -n 16
> ## format()ing invalid hand-constructed POSIXlt objects
> d <- as.POSIXlt("2016-12-06"); d$zone <- 1
> tools::assertError(format(d))
> d$zone <- NULL
> stopifnot(identical(format(d),"2016-12-06"))
> d$zone <- "CET" # = previous, but 'zone' now is last
> tools::assertError(format(d))
> dlt <- structure(
+ list(sec = 52, min = 59L, hour = 18L, mday = 6L, mon = 11L,...
2017 May 17
2
R-3.4.0 fails test
After installing R-3.4.0 I ran 'make check' which halted here:
$ > tail reg-tests-1d.Rout.fail -n 16
> ## format()ing invalid hand-constructed POSIXlt objects
> d <- as.POSIXlt("2016-12-06"); d$zone <- 1
> tools::assertError(format(d))
> d$zone <- NULL
> stopifnot(identical(format(d),"2016-12-06"))
> d$zone <- "CET" # = previous, but 'zone' now is last
> tools::assertError(format(d))
> dlt <- structure(
+ list(sec = 52, min = 59L, hour = 18L, mday = 6L, mon = 11L,...
2016 Sep 08
4
R (development) changes in arith, logic, relop with (0-extent) arrays
...uot;)))
>> > >> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
>> > >>
>> > >> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
>> > >> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not
>> match
>> > the
>> > >> length of object [2]
>> > >> > tools::assertError(m1 < 1:2)# ERR: (ditto)
>> > >> > ##
>> > >> > ## non-0-len...
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
...matrix(1,1,1, dimnames=list("Ro","col")))
>> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
>>
>> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
>> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not match the
>> length of object [2]
>> > tools::assertError(m1 < 1:2)# ERR: (ditto)
>> > ##
>> > ## non-0-length arrays combined with {NULL or double() or ...} *fail*
>>
>...
2016 Sep 08
1
R (development) changes in arith, logic, relop with (0-extent) arrays
...>> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
>>>>> >>
>>>>> >> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
>>>>> >> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not
>>>>
>>>> match
>>>>>
>>>>> the
>>>>> >> length of object [2]
>>>>> >> > tools::assertError(m1 < 1:2)# ERR: (ditto)
>>>...
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
...uot;,"col")))
> > >> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
> > >>
> > >> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
> > >> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not match
> > the
> > >> length of object [2]
> > >> > tools::assertError(m1 < 1:2)# ERR: (ditto)
> > >> > ##
> > >> > ## non-0-length arrays combined with {NUL...
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
...>>> >> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
>>>> >>
>>>> >> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
>>>> >> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not
>>> match
>>>> the
>>>> >> length of object [2]
>>>> >> > tools::assertError(m1 < 1:2)# ERR: (ditto)
>>>> >> > ##
>>>> >>...
2016 Sep 08
0
R (development) changes in arith, logic, relop with (0-extent) arrays
...> > >> > (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
>>> > >>
>>> > >> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
>>> > >> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not
>>> match
>>> > the
>>> > >> length of object [2]
>>> > >> > tools::assertError(m1 < 1:2)# ERR: (ditto)
>>> > >> > ##
>>> > &g...
2016 Sep 09
1
R (development) changes in arith, logic, relop with (0-extent) arrays
...gt; (m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
>>>> > >>
>>>> > >> > m1 + 1:2 # -> 2:3 but now with warning to "become ERROR"
>>>> > >> > tools::assertError(m1 & 1:2)# ERR: dims [product 1] do not
>>>> match
>>>> > the
>>>> > >> length of object [2]
>>>> > >> > tools::assertError(m1 < 1:2)# ERR: (ditto)
>>>> > &...
2017 May 17
1
problem running test on a system without /etc/localtime
...>>
>> [builder at localhost tests]$ TZ="GMT" ../bin/R --vanilla < reg-tests-1d.R
>>
>>> ## format()ing invalid hand-constructed POSIXlt objects
>>> d <- as.POSIXlt("2016-12-06"); d$zone <- 1
>>> tools::assertError(format(d))
>> Error: Failed to get error in evaluating format(d)
>> Execution halted
>>
>> It seems that the best solution will be to patch Sys.timezone.
>>
>> --
>> KM
>>
>> _______________________________...
2017 May 17
3
problem running test on a system without /etc/localtime
...environment variable, but
that causes tests to fail in another place:
[builder at localhost tests]$ TZ="GMT" ../bin/R --vanilla < reg-tests-1d.R
> ## format()ing invalid hand-constructed POSIXlt objects
> d <- as.POSIXlt("2016-12-06"); d$zone <- 1
> tools::assertError(format(d))
Error: Failed to get error in evaluating format(d)
Execution halted
It seems that the best solution will be to patch Sys.timezone.
--
KM
2015 Dec 11
3
For integer vectors, `as(x, "numeric")` has no effect.
...ns="numeric")
myNid <- setClass("myNid", contains="numeric", representation(id="character"))
NN <- setClass("NN", representation(x="numeric"))
(m1 <- myN (1:3))
(m2 <- myNid(1:3, id = "i3"))
tools::assertError(NN (1:3))# in all R versions
## # current R | new R
## # -----------|----------
class(getDataPart(m1)) # integer | numeric
class(getDataPart(m2)) # integer | numeric
In other words, with the above setting, the traditional
gentleperson...
2020 Feb 29
3
R 3.6.3 is released
...(with HTTP/2 servers), reported by G'abor Cs'ardi.
* predict(loess(..), se=TRUE) now errors out (instead of
seg.faulting etc) for large sample sizes, thanks to a report and
patch by Benjamin Tyner in PR#17121.
* tools:assertCondition(., "error") and hence assertError() no
longer return errors twice (invisibly).
* update(form, new) in the case of a long new formula sometimes
wrongly eliminated the intercept from form, or (more rarely)
added a garbage term (or seg.faulted !); the fix happened by
simplifying the C-level logic of terms....
2020 Feb 29
3
R 3.6.3 is released
...(with HTTP/2 servers), reported by G'abor Cs'ardi.
* predict(loess(..), se=TRUE) now errors out (instead of
seg.faulting etc) for large sample sizes, thanks to a report and
patch by Benjamin Tyner in PR#17121.
* tools:assertCondition(., "error") and hence assertError() no
longer return errors twice (invisibly).
* update(form, new) in the case of a long new formula sometimes
wrongly eliminated the intercept from form, or (more rarely)
added a garbage term (or seg.faulted !); the fix happened by
simplifying the C-level logic of terms....
2020 Feb 29
3
R 3.6.3 is released
...(with HTTP/2 servers), reported by G'abor Cs'ardi.
* predict(loess(..), se=TRUE) now errors out (instead of
seg.faulting etc) for large sample sizes, thanks to a report and
patch by Benjamin Tyner in PR#17121.
* tools:assertCondition(., "error") and hence assertError() no
longer return errors twice (invisibly).
* update(form, new) in the case of a long new formula sometimes
wrongly eliminated the intercept from form, or (more rarely)
added a garbage term (or seg.faulted !); the fix happened by
simplifying the C-level logic of terms....
2017 Jun 23
4
duplicated factor labels.
...[1] A A
> Levels: A
>>
>
> I wonder how many CRAN package checks will "break" from
> this (my guess is in the order of a dozen), but I hope
> that these breakages will be benign, e.g., similar to the above
> case where before an error was expected via tools :: assertError(.)
>
> Martin
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmar...