Re: [Rd] help with rchk warnings on Rf_eval(Rf_lang2(...))

2020-03-23 Thread Simon Urbanek
Ben, yes, you have to store the result into a variable, then unprotect, then return. Cheers, S > On 24/03/2020, at 10:07 AM, Ben Bolker wrote: > > > Thanks, that's really useful. One more question for you, or someone > else here: > > const ArrayXd glmLink::linkFun(const ArrayXd& mu) const

Re: [Rd] help with rchk warnings on Rf_eval(Rf_lang2(...))

2020-03-23 Thread Martin Maechler
> Ben Bolker > on Mon, 23 Mar 2020 17:07:36 -0400 writes: > Thanks, that's really useful. One more question for you, or someone > else here: > const ArrayXd glmLink::linkFun(const ArrayXd& mu) const { > return as(::Rf_eval(::Rf_lang2(as(d_linkFun), > as(Rcpp::Nu

Re: [Rd] help with rchk warnings on Rf_eval(Rf_lang2(...))

2020-03-23 Thread Ben Bolker
Thanks, that's really useful. One more question for you, or someone else here: const ArrayXd glmLink::linkFun(const ArrayXd& mu) const { return as(::Rf_eval(::Rf_lang2(as(d_linkFun), as(Rcpp::NumericVector(mu.data(), mu.data() + mu.size()))

Re: [Rd] help with rchk warnings on Rf_eval(Rf_lang2(...))

2020-03-23 Thread Tomas Kalibera
On 3/23/20 8:39 PM, Ben Bolker wrote: Dear r-devel folks, [if this is more appropriate for r-pkg-devel please let me know and I'll repost it over there ...] I'm writing to ask for help with some R/C++ integration idioms that are used in a package I'm maintaining, that are unfamilar to me, an

[Rd] help with rchk warnings on Rf_eval(Rf_lang2(...))

2020-03-23 Thread Ben Bolker
Dear r-devel folks, [if this is more appropriate for r-pkg-devel please let me know and I'll repost it over there ...] I'm writing to ask for help with some R/C++ integration idioms that are used in a package I'm maintaining, that are unfamilar to me, and that are now being flagged as problemat

Re: [Rd] unlink() on "~" removes the home directory

2020-03-23 Thread Gábor Csárdi
Thanks, I saw the commit, and it seems like a great fix to me! Best, Gabor On Mon, Mar 23, 2020 at 5:04 PM Tomas Kalibera wrote: > > To clarify, these issues are about deleting the contents of the home > directory, not the directory itself, which cannot be deleted by ordinary > users on today's

Re: [Rd] unlink() on "~" removes the home directory

2020-03-23 Thread Tomas Kalibera
To clarify, these issues are about deleting the contents of the home directory, not the directory itself, which cannot be deleted by ordinary users on today's systems. Unfortunately this has to be fixed in the code that calls unlink(), such code must be aware of the expansions. The "R CMD build

Re: [Rd] Inconsistant result for normalizePath on Windows

2020-03-23 Thread William Dunlap via R-devel
Re the trailing path separator - should file.path() be changed to not produce doubled path separators when an argument has a trailing path separator? Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Mar 23, 2020 at 9:24 AM Tomas Kalibera wrote: > > Hi Jiefei, > > the change in handling tra

Re: [Rd] Inconsistant result for normalizePath on Windows

2020-03-23 Thread Tomas Kalibera
Hi Jiefei, the change in handling trailing path separators is not on purpose, but is a byproduct of a new implementation of normalizePath, which now handles symbolic links and normalizes case in long path names. It is not documented what happens to trailing separators, and hence portable pr

[Rd] Inconsistant result for normalizePath on Windows

2020-03-23 Thread Wang Jiefei
Hi all, I saw a quite surprising result in the devel R when using the function *normalizePath*. If the input is a path to a folder, the function returns an absolute path with/without a slash at the end depending on the existence of the folder. I know both results are valid on Windows but this beha

Re: [Rd] Grid pmax Unusual Result In Alpha Version

2020-03-23 Thread Dario Strbenac
Sorry, I was dragging the laptop's cursor towards the Discard button but it activated on Send instead. Please ignore or delete from mailing archive. From: Martin Maechler Sent: Monday, 23 March 2020 11:10 PM To: Dario Strbenac Subject: Re: [Rd] Grid pmax

[Rd] Grid pmax Unusual Result In Alpha Version

2020-03-23 Thread Dario Strbenac
Hello, I find that the width of a plot is zero when three grobs are input but is as expected when any subset of two of the three grobs are used. -- Dario Strbenac University of Sydney Camperdown NSW 2050 Australia ___