[Rd] New R function is.nana = is.na & !is.nan

2019-12-31 Thread Jan Gorecki
Hello R-devel,

Best wishes in the new year. I am writing to kindly request new R
function so NA_real_ can be more easily detected.
Currently if one wants to test for NA_real_ (but not NaN) then extra
work has to be done: `is.na(x) & !is.nan(x)`
Required functionality is already at C level so to address my request
there is not that much to do.
Kevin Ushey made a nice summary of current R C api in:
https://stackoverflow.com/a/26262984/2490497
Pasting related part below, extra row added by me is a requested feature.

+-+
| C fun| NaN | NA | R fun
+-+
| ISNAN|  t  | t  | is.na
| R_IsNaN  |  t  | f  | is.nan
| ISNA |  f  | t  | is.na && !is.nan
| R_IsNA   |  f  | t  | is.na && !is.nan
+-+
+-+
| R fun| NaN | NA | C fun
+-+
| is.na|  t  | t  | ISNAN
| is.nan   |  t  | f  | R_IsNaN
+-+
| is.nana  |  f  | t  | R_IsNA
+-+

Strictly speaking, I am asking for a new R function:

is.nana <- function(x) if (typeof(x)=="numeric")
.Primitive("is.nana") else .Primitive("is.na")

Then probably a copy of C function `do_isnan` as `do_isnana` with a
minor change from `R_IsNaN` to `R_IsNA`.

Best,
Jan Gorecki

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] best way to build from Git

2019-12-31 Thread frederik

Thank you all for your replies.

On Thu, Dec 26, 2019 at 01:06:48PM +, Gábor Csárdi wrote:

On Thu, Dec 26, 2019 at 12:39 PM Martin Maechler

...
It would probably really be useful, if Lionel (or someone else)
updated his nice write-up and auxiliary {script / make} - files
so things work too when build with "src-dir != build-dir".


I am not sure what you mean, what is wrong with this build directory?
https://bookdown.org/lionel/contributing/building-r.html#sec:build


Yes it seems that Lionel's instructions successfully build a Git repo
containing R into a separate build directory. Thank you Lionel.

I've adapted these instructions, together with Lionel's GNUmakefile
and make-svn-revision script, to suit my (Linux-based) environment. I
put it in a little GitHub repository. Currently the following commands
work for me to download and install R in my home directory:

git clone https://github.com/navarum/tweaks
PREFIX=~/.local ./tweaks/r/BUILD install

For now it applies one example patch on top of a fixed recent commit
to the upstream repo https://github.com/wch/r-source/ . I noticed that
the first commit hash I selected from 'git log' was not stable, so I'm
not sure if this script will work tomorrow or next week. However, I
thought I ought to share it in case others find it useful. I tried to
make the (Bash) code concise enough that it would be possible for
others to see what it is doing and adapt it to maintaining their own
patch series on top of some version of R. I've been using this tool to
maintain custom versions of other software packages as well, so there
may be a little "too much information" in there - but someone could
obviously fork it and keep just what they need. The system tries to be
somewhat intelligent about remembering whether configure was run,
checking if the patches need to be reapplied, not overwriting any
changes I might have made to the cloned r-source git repo, and so on.

Just for the record, my original question on this thread was about the
reasons for not having R's default build system work with different
revision control systems, as well as some apparent typos in the
Makefile that comes with R.

Thank you,

Frederick

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] how to check as CRAN with alternative BLAS?

2019-12-31 Thread Juan Telleria Ruiz de Aguirre
Give a try to "rhub":

https://cran.r-project.org/web/packages/rhub/index.html

https://cran.r-project.org/web/packages/rhub/vignettes/local-debugging.html

Which allows to try different os, and system configurations :)

Hope it works!

El lunes, 30 de diciembre de 2019, Dirk Eddelbuettel 
escribió:

>
> On 29 December 2019 at 16:39, steven pav wrote:
> | One of my packages is slated to be archived from CRAN due to failures
> when
> | the ATLAS BLAS is used. I am unable to replicate the error on my machine
> | under R 3.6.1 using the atlas library from ubuntu (seems to be 3.10.2-9,
> | while the good professor is using 3.10.3 per
> | https://www.stats.ox.ac.uk/pub/bdr/Rblas/README.txt ). I also tried the
> | rocker/r-base with R 3.6.2
> | and /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 (Dockerfile here:
> | https://gist.github.com/shabbychef/efaa048f0f715dcf89fd39f2e28a402d ),
> but
> | was unable to replicate the error there. Is there some way to *really*
> test
> | as CRAN-with-atlas? I would prefer a dockerized solution, or failing
> that,
> | a travis CI recipe.
>
> That CRAN checks cannot always be replicated outside of CRAN is a real
> issue.
>
> This has been brought up before, and some of us wanted to see about
> improving
> it, possibly relying on Docker---but as you know life is short, spare time
> is
> generally missing, and other shiny things can distract us.  So nothing to
> report yet. Which is a bummer.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel