Re: [R-pkg-devel] testing for NaN in C++ code

2021-03-05 Thread Ben Bolker
Thanks! Now I see this is in Writing R Extensions, should have looked more carefully ... On 3/5/21 9:00 PM, Andrew Simmons wrote: Hello, You probably want one of the following ISNA         TRUE for R's NA only ISNAN      TRUE for R's and IEEE's NaN R_IsNaN   TRUE for IEEE'S NaN only On

[R-pkg-devel] testing for NaN in C++ code

2021-03-05 Thread Ben Bolker
I would like to test for NaN inside C++ code that lives inside a CRAN package. Following the StackOverflow question linked below, I was using #define isNAN(a) (a!=a) which I *think* used to work, but at some point along the way it stopped working due to compiler/flag changes. I'm thinking

Re: [R-pkg-devel] Vignettes from LaTeX files.

2021-03-05 Thread Duncan Murdoch
On 05/03/2021 2:40 p.m., Henrik Bengtsson wrote: Thank you. Glad to hear it's useful. This plain TeX/LaTeX vignette engine is implemented using base R. If someone is willing to drive the efforts, I think it's not too much work to refactor it and propose it for base R itself, where I think it

Re: [R-pkg-devel] Vignettes from LaTeX files.

2021-03-05 Thread Henrik Bengtsson
Thank you. Glad to hear it's useful. This plain TeX/LaTeX vignette engine is implemented using base R. If someone is willing to drive the efforts, I think it's not too much work to refactor it and propose it for base R itself, where I think it belongs, e.g. in the 'utils' package where Sweave

Re: [R-pkg-devel] Using data.table in a package

2021-03-05 Thread Dirk Eddelbuettel
Martin, Both questions are FAQs. Searches at e.g. StackOverflow might have lead you to a solution (and you can search there, key is to add the tag i.e. make [r] or [data.table] part of the search term). The first one is a generic package programming question. You can use Imports: in

Re: [R-pkg-devel] Using data.table in a package

2021-03-05 Thread neonira Arinoem
Question one is a matter of personal preference. I personally stick to explicitly state a double column depency with data.table. Question two. Just replacing the dot by list is sufficient AFAIK. Hope this helps Le ven. 5 mars 2021 à 14:28, Martin Møller Skarbiniks Pedersen <

Re: [R-pkg-devel] Using data.table in a package

2021-03-05 Thread Duncan Murdoch
On 05/03/2021 8:27 a.m., Martin Møller Skarbiniks Pedersen wrote: Hi, I am converting a couple of functions into a R-package. Many of the functions use data.table. I have two questions using data.table in my own package. Normally I would put each question in separate emails but I think

[R-pkg-devel] Using data.table in a package

2021-03-05 Thread Martin Møller Skarbiniks Pedersen
Hi, I am converting a couple of functions into a R-package. Many of the functions use data.table. I have two questions using data.table in my own package. Normally I would put each question in separate emails but I think they might be connected. First question is short and I think the

Re: [R-pkg-devel] Why .Rbuildignore doesn't ignore?

2021-03-05 Thread Jose Barrera
Dear Jeff, I am aware I don't need to be worried about those two warnings but many thanks anyway. Jose Barrera Statistician, Associate Lecturer *IS**Global* Barcelona Institute for Global Health - Campus MAR Barcelona Biomedical Research Park (PRBB) (Room Hypatia) Doctor Aiguader, 88 08003

Re: [R-pkg-devel] Why .Rbuildignore doesn't ignore?

2021-03-05 Thread Jose Barrera
Dear Duncan, .Rbuildignore is spelled correctly, and no non-ASCII characters in. All tools:::inRbuildignore(list.files(), ".") were FALSE, so I decided to rewrite .Rbuildignore from scratch, just in case there was any extra space. I think that was the problem because now