Martin Maechler
2020-Jan-14 08:20 UTC
[Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!
>>>>> Avraham Adler >>>>> on Mon, 13 Jan 2020 14:38:12 -0500 writes:> Those of us stuck on Windows but who attempt to develop properly are > wounded to the quick, sir! > :) > Avi Indeed, you had a ' :) ' , but others have perceived this as an insult. I'm really really sorry for that and do want to apologize to all of you affected. Indeed, on one hand, not everybody has a choice, and even then, I'm (and 100s of 1000s of others) are very grateful to those among you who develop and test R (and other free software, say, Emacs, or Rstudio) on Windows. I do want to entice people to have a long look beyond closed source OS into the world of Free Software where not only R is FOSS (Free and Open Source Software) but (all / almost) all the tools you use are of that same spirit. Best, Martin > On Mon, Jan 13, 2020 at 12:24 PM Martin Maechler <maechler at stat.math.ethz.ch> > wrote: >> >>>>> Ben Bolker >> >>>>> on Mon, 13 Jan 2020 11:49:09 -0500 writes: >> >> > From R NEWS (changes in 3.6.0) >> > Experimentally, setting environment variable >> _R_CHECK_LENGTH_1_LOGIC2_ >> > will lead to warnings (or errors if the variable is set to a ?true? >> > value) when && or || encounter and use arguments of length more than >> one. >> >> Indeed, thank you, Ben. >> >> Note (Dirk) this is not just something >> "by Henrik (..) as he tried to convince us all to use it more" >> >> I've activated this (and the other >> _R_CHECK_LENGTH_1_CONDITION_ ! ) >> for years (maybe not many years, it just feels like it), and *EVERY TIME* >> it triggers, it's been revealing a programmeR's thinko / bug / .., >> something where the code was clearly suboptimal and should've been >> improved. >> (Unfortunately, the bug has often been in packages, and sometimes I had to >> disable the setting when I wanted that "buggy" package to work ..) >> >> Occasionally being puristic, let me state this: >> __________________________________________________________________ >> /------------------------------------------------------------------\ >> | | >> | Every careful R programmer should use (something like "true", | >> | "verbose", or even package=... ) | >> | | >> | export _R_CHECK_LENGTH_1_CONDITION_=true | >> | export _R_CHECK_LENGTH_1_LOGIC2_=verbose | >> | | >> | in her/his ~/.profile equivalent (*) | >> \__________________________________________________________________/ >> >> >> *) well assuming a careful R programmer would never develop on >> Windows anyway (where you need different means to set such >> environment variables). >> >> >> >> > On 2020-01-13 11:46 a.m., Therneau, Terry M., Ph.D. via R-devel >> wrote: >> >> Thanks for the feedback Dirk. I sent my follow-up before I saw it. >> >> >> >> Looking at the source code, it appears that there is no options() >> call >> >> to turn this on. Nor does "R --help" reveal a command line option. >> >> How then does a user turn this on outside of the R CMD check >> >> envirionment, so as to chase things like this down? >> >> >> >> The fact that 1. renaming my function makes the error go away, 2. my >> >> function is just a wrapper to inherits(), and 3. its a new error in >> code >> >> that hasn't changed, all point me towards some oddity with the check >> >> function. >> >> >> >> Terry >> >> >> >> >> >> On 1/13/20 10:22 AM, Dirk Eddelbuettel wrote: >> >>> >> >>> On 13 January 2020 at 10:02, Therneau, Terry M., Ph.D. via R-devel >> wrote: >> >>> | Where can I find out (and replicate) what options as-cran turns >> on? >> >>> >> >>> See the file src/library/tools/R/check.R in the R sources, and >> grep for >> >>> as_cran which is the internal variable controlled by the --as-cran >> option >> >>> >> >>> [...] >> >>> >> >>> | The check log contains multiple instances of the lines below: >> >>> | >> >>> | < Warning message: >> >>> | < In if (ismat(kmat)) { : >> >>> | < the condition has length > 1 and only the first element will >> be >> >>> used >> >>> | >> >>> | I don't see how the error could arise, but if I know what >> as-cran is >> >>> doing perhaps I can >> >>> | replicate it. >> >>> >> >>> This was widely discussed on this list and should also be in the >> NEWS >> >>> file. >> >>> >> >>> The change is about what the message says: the if () tests a scalar >> >>> logical, >> >>> it appears that ismat(kmat) returns more than a scalar. >> >>> >> >>> There has always been an opt-in for this to error -- cf many >> messages >> >>> by Henrik >> >>> over the years as he tried to convince us all to use it more. >> >>> >> >>> >> >>> Dirk >> >>> >> >> >> >> ______________________________________________ >> >> R-devel at r-project.org mailing list >> >> https://stat.ethz.ch/mailman/listinfo/r-devel >> >> > ______________________________________________ >> > R-devel at r-project.org mailing list >> > https://stat.ethz.ch/mailman/listinfo/r-devel >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > -- > Sent from Gmail Mobile > [[alternative HTML version deleted]] > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Abby Spurdle
2020-Jan-14 20:29 UTC
[Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!
> I do want to entice people to have a long look beyond closed > source OS into the world of Free Software where not only R is > FOSS (Free and Open Source Software) but (all / almost) all the > tools you use are of that same spirit.And while everyone is talking about operating systems... Recently, I tried to install R on Fedora. However, it only gave me the option of downloading and installing R 3.6.1, when the current release is/was R 3.6.2. I decided to wait, and may try again later, over the next week. Is it possible for things to be free *and* simple?
Dirk Eddelbuettel
2020-Jan-14 21:00 UTC
[Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!
On 15 January 2020 at 09:29, Abby Spurdle wrote: | Recently, I tried to install R on Fedora. | However, it only gave me the option of downloading and installing R | 3.6.1, when the current release is/was R 3.6.2. | I decided to wait, and may try again later, over the next week. | | Is it possible for things to be free *and* simple? Sure. Look at the Dockerfile (== "recipe", like shell) for the r-base container. https://github.com/rocker-org/rocker/blob/master/r-base/Dockerfile Starts from vanilla Debian testing, and installs R. Takes no time, is fully automated and has been running that way for years. You can build up from there, my blog has examples, as have many many other sites by other people. One other recent-ish example is the r-apt Rocker image. Sets the repo for current R (based on builds that Michael Rutter looks after based on my official Debian package), then adds info for the PPAs Michael looks after and you got over 4,000 CRAN packages ready to install as binaries -- just like that. The link is for 'disco' aka 19.04, we have the others too (but I need to add 19.10 now). https://github.com/rocker-org/rocker/blob/master/r-apt/disco/Dockerfile Both meet free *and* simple. And you don't have to build either. Just 'docker pull'. There is more at the Rocker Project for you. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Marc Schwartz
2020-Jan-14 21:32 UTC
[Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!
> On Jan 14, 2020, at 3:29 PM, Abby Spurdle <spurdle.a at gmail.com> wrote: > >> I do want to entice people to have a long look beyond closed >> source OS into the world of Free Software where not only R is >> FOSS (Free and Open Source Software) but (all / almost) all the >> tools you use are of that same spirit. > > And while everyone is talking about operating systems... > > Recently, I tried to install R on Fedora. > However, it only gave me the option of downloading and installing R > 3.6.1, when the current release is/was R 3.6.2. > I decided to wait, and may try again later, over the next week. > > Is it possible for things to be free *and* simple?Abby, Which version of Fedora are you on? The Fedora RPM build system for R: https://koji.fedoraproject.org/koji/packageinfo?packageID=1230 would seem to suggest that R 3.6.2 may not be available for Fedora 29 or earlier, which is not a surprise, given the rapid update cycle used on Fedora. R 3.6.2 is available for Fedora 30, 31 and 32 per the above page. If you are on Fedora >=30, you might check your yum repo to see if it has been properly updated. Otherwise, if you are on Fedora <=29, you should think about updating your Fedora installation. You may or may not be aware that there is a dedicated list for R on Fedora/RHEL and derivatives: https://stat.ethz.ch/mailman/listinfo/r-sig-fedora Tom Callaway, who is the RH/Fedora maintainer for R is on that list, so you can pose queries to him via that list for any issues with R on Fedora. Regards, Marc Schwartz
Abby Spurdle
2020-Jan-20 20:15 UTC
[Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!
> I do want to entice people to have a long look beyond closed > source OS into the world of Free Software where not only R is > FOSS (Free and Open Source Software) but (all / almost) all the > tools you use are of that same spirit. > > Best, > MartinI've reconsidered. You're 100% correct. I'm planning to try ReactOS. (Hope it works...) Thanks Martin, great advice...
Martin Maechler
2020-Jan-21 09:51 UTC
[Rd] as-cran issue ==> set _R_CHECK_LENGTH_1_* settings!
>>>>> Abby Spurdle >>>>> on Tue, 21 Jan 2020 09:15:39 +1300 writes:>> I do want to entice people to have a long look beyond closed >> source OS into the world of Free Software where not only R is >> FOSS (Free and Open Source Software) but (all / almost) all the >> tools you use are of that same spirit. >> >> Best, >> Martin > I've reconsidered. > You're 100% correct. Thank you. > I'm planning to try ReactOS. > (Hope it works...) > Thanks Martin, great advice... Well, to choose ReactOS () instead of a version of Linux (there have some Linux distributions that have aimed for being close to Windows in their "look and feel") is much braver and more risky, but then, your learning experience, including possibly being the first one to run R there (?) ((possibly even learning how to *build* R there from the sources ??)), will feel more frontier-like and self determined than just following the Linux crowd ;-) ;-) :-) Martin