Re: [R] Error with devTools

2020-04-13 Thread Duncan Murdoch
On 13/04/2020 2:50 p.m., iurii.chernia...@t-systems.com wrote: Hi everyone! Could somebody help me, I`m trying to run devtools::test() from R-console and it doesn't` work, but it works via RStudio if I will remove devtools before. I'd guess you don't have the PATH set properly so compilers

Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread Martin Maechler
> William Dunlap > on Mon, 13 Apr 2020 09:57:11 -0700 writes: > You can avoid the problem in Martin's example by only giving scalars to > stopifnot(). E.g., using stopifnot(all(x>0)) or stopifnot(length(x)==1, x> 0) instead of stopifnot(x>0). I think having stopifnot

[R] Error with devTools

2020-04-13 Thread Iurii.Cherniatin
Hi everyone! Could somebody help me, I`m trying to run devtools::test() from R-console and it doesn't` work, but it works via RStudio if I will remove devtools before. Error from console: Loading space Error in (function (command = NULL, args = character(), error_on_status = TRUE, :

Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread William Dunlap via R-help
You can avoid the problem in Martin's example by only giving scalars to stopifnot(). E.g., using stopifnot(all(x>0)) or stopifnot(length(x)==1, x>0) instead of stopifnot(x>0). I think having stopifnot call all(predicate) if length(predicate)!=1 was probably a mistake. Bill Dunlap TIBCO Software

Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread Hervé Pagès
On 4/13/20 05:30, Martin Maechler wrote: peter dalgaard on Mon, 13 Apr 2020 12:00:38 +0200 writes: > Inline... >> On 13 Apr 2020, at 11:15 , Martin Maechler wrote: >> >>> Bert Gunter >>> on Sun, 12 Apr 2020 16:30:09 -0700 writes: >> >>>

Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread Martin Maechler
> peter dalgaard > on Mon, 13 Apr 2020 12:00:38 +0200 writes: > Inline... >> On 13 Apr 2020, at 11:15 , Martin Maechler wrote: >> >>> Bert Gunter >>> on Sun, 12 Apr 2020 16:30:09 -0700 writes: >> >>> Don't know if this has come up before, but

Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread peter dalgaard
Inline... > On 13 Apr 2020, at 11:15 , Martin Maechler wrote: > >> Bert Gunter >>on Sun, 12 Apr 2020 16:30:09 -0700 writes: > >> Don't know if this has come up before, but ... >>> x <- c(0,0) >>> length(x) >> [1] 2 >> ## but >>> stopifnot(length(x)) >> Error: length(x) is not TRUE

Re: [R] A stopifnot() nastiness, even if not a bug

2020-04-13 Thread Martin Maechler
> Bert Gunter > on Sun, 12 Apr 2020 16:30:09 -0700 writes: > Don't know if this has come up before, but ... >> x <- c(0,0) >> length(x) > [1] 2 > ## but >> stopifnot(length(x)) > Error: length(x) is not TRUE > Called from: top level > ## but >>