Re: [Rd] Question about regexp edge case

2024-08-09 Thread Duncan Murdoch
Thanks! I think your suggested additions to the docs are perfect. Duncan Murdoch On 2024-08-09 5:01 a.m., Tomas Kalibera wrote: On 8/1/24 20:55, Duncan Murdoch wrote: Thanks Tomas.  Do note that my original post also mentioned a bug or doc error in the PCRE docs for this regexp:   - perl

Re: [Rd] Question about regexp edge case

2024-08-09 Thread Tomas Kalibera
On 8/1/24 20:55, Duncan Murdoch wrote: Thanks Tomas.  Do note that my original post also mentioned a bug or doc error in the PCRE docs for this regexp:   - perl = TRUE does *not* give the documented result on at least one system (which is "123456789", because "{,5}" is documented to not be

Re: [Rd] Question about regexp edge case

2024-08-01 Thread Duncan Murdoch
Thanks Tomas. Do note that my original post also mentioned a bug or doc error in the PCRE docs for this regexp: - perl = TRUE does *not* give the documented result on at least one system (which is "123456789", because "{,5}" is documented to not be a quantifier, so it should only match the

Re: [Rd] Question about regexp edge case

2024-08-01 Thread Tomas Kalibera
On 7/29/24 09:37, Ivan Krylov via R-devel wrote: В Sun, 28 Jul 2024 20:02:21 -0400 Duncan Murdoch пишет: gsub("^([0-9]{,5}).*","\\1","123456789") [1] "123456" This is in TRE itself: for "^([0-9]{,1})" tre_regexecb returns {.rm_so = 0, .rm_eo = 1}, matching "1", but for "^([0-9]{,2})" and ab

Re: [Rd] Question about regexp edge case

2024-07-29 Thread Ivan Krylov via R-devel
В Sun, 28 Jul 2024 20:02:21 -0400 Duncan Murdoch пишет: > gsub("^([0-9]{,5}).*","\\1","123456789") > [1] "123456" This is in TRE itself: for "^([0-9]{,1})" tre_regexecb returns {.rm_so = 0, .rm_eo = 1}, matching "1", but for "^([0-9]{,2})" and above it returns an off-by-one result, {.rm_so = 0

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-25 Thread Hervé Pagès
On 4/25/24 07:04, Kurt Hornik wrote: ... > Sure, I'll look into adding something. (Too late for 4.4.0, of course.) > > Best > -k Great. Thanks! H. -- Hervé Pagès Bioconductor Core Team hpages.on.git...@gmail.com [[alternative HTML version deleted]] _

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-25 Thread Kurt Hornik
> Hervé Pagès writes: > On 4/24/24 23:07, Kurt Hornik wrote: >>> Hervé Pagès writes: >>> Hi Kurt, >>> Is it intended that numeric_version() returns an error by default on >>> non-character input in R 4.4.0? >> Dear Herve, yes, that's the intention. >> >>> It seems that I can turn this int

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-25 Thread Kurt Hornik
> Dirk Eddelbuettel writes: > Hi Kurt, > On 25 April 2024 at 08:07, Kurt Hornik wrote: > | > Hervé Pagès writes: > | > | > Hi Kurt, > | > Is it intended that numeric_version() returns an error by default on > | > non-character input in R 4.4.0? > | > | Dear Herve, yes, that's the inten

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-25 Thread Dirk Eddelbuettel
Hi Kurt, On 25 April 2024 at 08:07, Kurt Hornik wrote: | > Hervé Pagès writes: | | > Hi Kurt, | > Is it intended that numeric_version() returns an error by default on | > non-character input in R 4.4.0? | | Dear Herve, yes, that's the intention. | | > It seems that I can turn this into a

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-25 Thread Hervé Pagès
On 4/24/24 23:07, Kurt Hornik wrote: >> Hervé Pagès writes: >> Hi Kurt, >> Is it intended that numeric_version() returns an error by default on >> non-character input in R 4.4.0? > Dear Herve, yes, that's the intention. > >> It seems that I can turn this into a warning by setting >> _R_CHECK_S

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-24 Thread Kurt Hornik
> Hervé Pagès writes: > Hi Kurt, > Is it intended that numeric_version() returns an error by default on > non-character input in R 4.4.0? Dear Herve, yes, that's the intention. > It seems that I can turn this into a warning by setting > _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_=false

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-24 Thread Hervé Pagès
Hi Kurt, Is it intended that numeric_version() returns an error by default on non-character input in R 4.4.0? It seems that I can turn this into a warning by setting _R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_=false but I don't seem to be able to find any of this mentioned in the NEWS fil

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-04-01 Thread Kurt Hornik
> Andrea Gilardi via R-devel writes: Thanks: should be fixed now in the trunk. Best -k > Thank you very much Dirk for your kind words and for confirming the bug. > Next week I will open a new issue on Bugzilla adding the related patch. > Kind regards > Andrea > On 29/03/2024 20:14, Dirk

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-03-30 Thread Andrea Gilardi via R-devel
Thank you very much Dirk for your kind words and for confirming the bug. Next week I will open a new issue on Bugzilla adding the related patch. Kind regards Andrea On 29/03/2024 20:14, Dirk Eddelbuettel wrote: On 29 March 2024 at 17:56, Andrea Gilardi via R-devel wrote: | Dear all, | | I hav

Re: [Rd] Question regarding .make_numeric_version with non-character input

2024-03-29 Thread Dirk Eddelbuettel
On 29 March 2024 at 17:56, Andrea Gilardi via R-devel wrote: | Dear all, | | I have a question regarding the R-devel version of .make_numeric_version() function. As far as I can understand, the current code (https://github.com/wch/r-source/blob/66b91578dfc85140968f07dd4e72d8cb8a54f4c6/src/libr

Re: [Rd] question about an R idiom: eval()ing a quoted block

2023-07-20 Thread peter dalgaard
In the case of power.t.test, there is a situation where you want to create 4 different functions with the same function body, in order to pass them to uniroot(). I think that at the time, it just seemed convenient to express that idea with a quote-eval (macro-like) construction, rather than figu

Re: [Rd] question about an R idiom: eval()ing a quoted block

2023-07-11 Thread Duncan Murdoch
On 11/07/2023 6:01 p.m., Ben Bolker wrote: In a few places in the R source code, such as the $initialize element of `family` objects, and in the body of power.t.test() (possibly other power.* functions), sets of instructions that will need to be run later are encapsulated by saving them as an

Re: [Rd] Question on non-blocking socket

2023-02-17 Thread Simon Urbanek
Ben, yes, by definition - non-blocking means that reads won't block and always return immediately (the point of non-blocking). The loop below is terrible as it will cause 100% CPU usage while it's spinning. It seems that you want to block so why are you using non-blocking mode? select() effecti

Re: [Rd] Question on non-blocking socket

2023-02-17 Thread Ben Engbers
Hi Tomas, Apparently, inserting some kind of socketSelect() is essential when using non-blocking sockets and a client/erve architecture. That is at least one thing that I have learned ;-). In C++, between sending and requesting, I inserted a call to this function: bool wait(int s) { fd_set

Re: [Rd] Question on non-blocking socket

2023-02-16 Thread Charlie Gao via R-devel
> Date: Wed, 15 Feb 2023 01:24:26 +0100 > From: Ben Engbers > To: r-devel@r-project.org > Subject: [Rd] Question on non-blocking socket > Message-ID: <68ce63b0-7e91-6372-6926-59f3fcfff...@be-logical.nl> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > Hi, > > December 27, 2021 I

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Tomas Kalibera
On 2/15/23 16:44, Ben Engbers wrote: Hi Op 15-02-2023 om 14:38 schreef Tomas Kalibera: On 2/15/23 01:24, Ben Engbers wrote: Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. .. I have two questions. The first is where I can find R documentati

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Ben Engbers
Hi Op 15-02-2023 om 14:38 schreef Tomas Kalibera: On 2/15/23 01:24, Ben Engbers wrote: Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. .. I have two questions. The first is where I can find R documentation on proper use of non-blocking socket

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Ivan Krylov
В Wed, 15 Feb 2023 01:24:26 +0100 Ben Engbers пишет: > where I can find R documentation on proper use of non-blocking > sockets and on the proper use of the socketSelect function? A useful guide to the Berkeley sockets API can be found at . You'll have to translate

Re: [Rd] Question on non-blocking socket

2023-02-15 Thread Tomas Kalibera
On 2/15/23 01:24, Ben Engbers wrote: Hi, December 27, 2021 I started a thread asking for help troubleshooting non-blocking sockets. While developing the RBaseX client, I had issues with the authentication process. It eventually turned out that a short break had to be inserted in this proces

Re: [Rd] Question about grid.group compositing operators in cairo

2022-10-12 Thread Paul Murrell
Hi This issue has expanded to include the behaviour of compositing operators in R graphics more generally. For the record, the discussion is continuing here ... https://github.com/pmur002/rgraphics-compositing Paul On 4/10/22 09:20, Paul Murrell wrote: Interim update:  I have spoken with

Re: [Rd] Question about grid.group compositing operators in cairo

2022-10-03 Thread Paul Murrell
Interim update: I have spoken with Thomas Lin Pedersen (cc'ed), the author/maintainer of 'ragg' and 'svglite', who is working on adding group support for those graphics devices and he has voted in support of the current Cairo implementation, so the needle has shifted towards Cairo at this st

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-29 Thread Paul Murrell
Hi Some more thoughts ... <1> I said before that currently, dev->group() does this ... [OVER] shape shape shape OP shape shape shape ... and one option would be an implicit group on 'src' and 'dst' like this ... ([OVER] shape shape shape) OP ([OVER] shape shape shape) ... but another appro

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-28 Thread Paul Murrell
Hi Would it work to explicitly record a filled-and-stroked shape as two separate elements (one only filled and one only stroked) ? Then it should only be as hard to apply the active operator on both of those elements as it is to apply the active operator to more than one shape (?) Paul On

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-28 Thread Panagiotis Skintzos
Thank you for the very thorough explanation Paul. To answer your question on 11: The dsvg device, simply defines svg elements with their attributes (rect with fill & stroke in my examples). It does not do any internal image processing like cairo. My concern is how to proceed with the implemen

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-28 Thread Paul Murrell
Hi Thanks for the code (and for the previous attachments). Some thoughts so far (HTML version with images attached) ... <1> As you have pointed out, the Cairo device draws a stroked-and-filled shape with two separate drawing operations: the path is filled and then the path is stroked. I do

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-27 Thread Panagiotis Skintzos
Here is the code again in text: src <- rectGrob(2/3, 1/3, width=.6, height=.6, gp=gpar(lwd = 5, fill=rgb(0, 0, 0.9, 0.4))) dst <- rectGrob(1/3, 2/3, width=.6, height=.6, gp=gpar(lwd = 5, fill=rgb(0.7, 0, 0, 0.8))) svg("cairo.in.svg", width = 5, height = 5) grid.group(src, "in", dst) dev.off(

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-27 Thread Panagiotis Skintzos
Hi, sure I attach the test code and my svg. You can also find my current work on ggiraph in the branch ge15 on github: https://github.com/sigmapi/ggiraph/tree/ge15 Thanks, Panagiotis On 27/9/22 04:44, Paul Murrell wrote: Could you also please send me the SVG code that your device is ge

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-26 Thread Paul Murrell
Could you also please send me the SVG code that your device is generating for your example. Thanks! Paul On 27/09/22 08:50, Paul Murrell wrote: Hi Thanks for the report.  It certainly sounds like I have done something stupid :)  For my debugging and testing could you please share the R

Re: [Rd] Question about grid.group compositing operators in cairo

2022-09-26 Thread Paul Murrell
Hi Thanks for the report. It certainly sounds like I have done something stupid :) For my debugging and testing could you please share the R code from your tests ? Thanks! Paul On 26/09/22 10:27, Panagiotis Skintzos wrote: Hello, I'm trying to update ggiraph package in graphic engine v1

Re: [Rd] Question about the UCRT switch

2021-12-09 Thread Tomas Kalibera
On 12/9/21 3:30 PM, Therneau, Terry M., Ph.D. via R-devel wrote: The connected blog has the statement  "Most authors will not have to do anything as the number of CRAN packages that will need some attention is below 1%, but authors of packages using native (C, C++ or Fortran) code should read

Re: [Rd] Question about quantile fuzz and GPL license

2021-09-15 Thread GILLIBERT, Andre
Martin Maechler wrote: > OTOH, type=7 is the default, and I guess used in 99.9% of > all uses of quantile, *and* does never use any fuzz Indeed. This also implies that this default should be well-thought when creating a new implementation of the quantile() procedure for a new programming l

Re: [Rd] Question about quantile fuzz and GPL license

2021-09-15 Thread Martin Maechler
> GILLIBERT, Andre > on Tue, 14 Sep 2021 16:13:05 + writes: > On 9/14/21 9:22 AM, Abel AOUN wrote: >> However I don't get why epsilon is multiplied by 4 instead of simply using epsilon. >> Is there someone who can explain this 4 ? > .Machine$double.eps is the "pr

Re: [Rd] Question about quantile fuzz and GPL license

2021-09-14 Thread GILLIBERT, Andre
On 9/14/21 9:22 AM, Abel AOUN wrote: > However I don't get why epsilon is multiplied by 4 instead of simply using > epsilon. > Is there someone who can explain this 4 ? .Machine$double.eps is the "precision" of floating point values for values close to 1.0 (between 0.5 and 2.0). Using fuzz =

Re: [Rd] Question about quantile fuzz and GPL license

2021-09-14 Thread Ben Bolker
On 9/14/21 9:22 AM, Abel AOUN wrote: Hello, I'm currently working on Python numpy package to develop linear interpolation methods for quantiles. Currently, numpy only support the type 7 of Hyndman & Fan and I did the implementation for the 8 other methods to do as much as R ::quantile. As

Re: [Rd] Question about R developpment

2017-06-12 Thread Morgan
Thank you all for these explanations. Kind regards, Morgan On 11 Jun 2017 02:47, "Duncan Murdoch" wrote: > On 10/06/2017 6:09 PM, Duncan Murdoch wrote: > >> On 10/06/2017 2:38 PM, Morgan wrote: >> >>> Hi, >>> >>> I had a question that might not seem obvious to me. >>> >>> I was wondering why the

Re: [Rd] Question about R developpment

2017-06-10 Thread Duncan Murdoch
On 10/06/2017 6:09 PM, Duncan Murdoch wrote: On 10/06/2017 2:38 PM, Morgan wrote: Hi, I had a question that might not seem obvious to me. I was wondering why there was no patnership between microsoft the R core team and eventually other developpers to improve R in one unified version instead o

Re: [Rd] Question about R developpment

2017-06-10 Thread Andrie de Vries
[mailto:r-devel-boun...@r-project.org] On Behalf Of Martyn Plummer Sent: 10 June 2017 16:06 To: Duncan Murdoch ; Morgan <2005.mor...@gmail.com>; r-devel@r-project.org Subject: Re: [Rd] Question about R developpment I would describe MRO as a distribution of R, in the same way that Fedora, Debian

Re: [Rd] Question about R developpment

2017-06-10 Thread Martyn Plummer
artyn From: R-devel on behalf of Duncan Murdoch Sent: 11 June 2017 00:09 To: Morgan; r-devel@r-project.org Subject: Re: [Rd] Question about R developpment On 10/06/2017 2:38 PM, Morgan wrote: > Hi, > > I had a question that might not seem obvious to me. > > I was wonder

Re: [Rd] Question about R developpment

2017-06-10 Thread Duncan Murdoch
On 10/06/2017 2:38 PM, Morgan wrote: Hi, I had a question that might not seem obvious to me. I was wondering why there was no patnership between microsoft the R core team and eventually other developpers to improve R in one unified version instead of having different teams developping their own

Re: [Rd] Question about R developpment

2017-06-10 Thread Roy Mendelssohn - NOAA Federal
https://www.r-consortium.org -Roy > On Jun 10, 2017, at 11:38 AM, Morgan <2005.mor...@gmail.com> wrote: > > Hi, > > I had a question that might not seem obvious to me. > > I was wondering why there was no patnership between microsoft the R core > team and eventually other developpers to improv

Re: [Rd] Question about CHARSXP and garbage collection

2016-02-13 Thread luke-tierney
They are garbage collected so you do need to protect them in C code. Best, luke On Sat, 13 Feb 2016, Holger Hoefling wrote: Hi, I had a technical question about CHARSXP and garbage collection and couldn't find the answer in the R manual. The question is this. Are CHARSXP garbage collected l

Re: [Rd] Question about bug reporting, and the followup process

2015-12-16 Thread Michael Felt
On 2015-12-16 16:40, Duncan Murdoch wrote: We generally ignore it, so your current practice is fine. The problem is that none of the core developers use AIX, so it's unlikely anyone will be able to test and fix your problems. You'll need to find an AIX expert, or fix them yourself. Duncan M

Re: [Rd] Question about bug reporting, and the followup process

2015-12-16 Thread Duncan Murdoch
On 16/12/2015 12:31 AM, Michael Felt wrote: Hi, I sent in three bug-reports (maybe should have been 4, because the second contains an "enhancement" as well as well as a bug). I do not set "Importance", ever - or, is that the custom here? We generally ignore it, so your current practice is fin

Re: [Rd] Question: Publishing R/S objects with WebServices (SOAP/WSDL)

2014-07-22 Thread Geoff Jentry
So far I see many packages that allow R to consume WebServices, but I haven't seen anything that allows you to publish a package as a WebService. If you haven't already, look at the RWebServices package from Bioconductor. __ R-devel@r-project.org ma

Re: [Rd] Question: Publishing R/S objects with WebServices (SOAP/WSDL)

2014-07-22 Thread Tobias Verbeke
Hi Kurt, The R Service Bus was made to do this. http://rsb.doc.openanalytics.eu/dev/ http://rsb.doc.openanalytics.eu/dev/wsdocs/index.html Running in production at multiple big pharma companies since 2010. Open source and freely available. Best, Tobias - Original Message - > From: "K

Re: [Rd] Question: Publishing R/S objects with WebServices (SOAP/WSDL)

2014-07-22 Thread Dirk Eddelbuettel
On 22 July 2014 at 07:21, Kurt Schallitz wrote: | Can anyone tell me if there is a package which will allow me to write a | package in R, then publish the package using WebServices? The idea is that | I want to be able to pass a data set into R, have R perform the | calculations, then send the res

Re: [Rd] Question on Code snippet semantics

2014-07-21 Thread William Dunlap
subsitute(expr), with only one argument, is only useful inside of a function and then only when the expression, expr, involves an argument to the function. Then the unevaluated actual arguments to the function are substituted into the [unevaluated] expression. E.g., f <- function(x, y=stop("y

Re: [Rd] Question on Code snippet semantics

2014-07-21 Thread Marc Schwartz
On Jul 21, 2014, at 10:07 AM, Mick Jordan wrote: > I came across this code in library.R > > package <- as.character(substitute(package)) > > where package is the first argument to the "library" function. > > I've been racking my brains to understand why this is not just an elaborate > (and i

Re: [Rd] Question about fifo behavior on Linux between versions 3.0.3 and 3.1.0

2014-05-20 Thread Prof Brian Ripley
It _was_ part of the fifo for Windows patch. As if does not seem to be needed for Windows, it has been reverted. On 20/05/2014 16:02, James Smith wrote: Version 3.1.0 of R has imposed a very small data limit on writing to fifos on Linux. Consider the following R code (Assumes that "ff" is a

Re: [Rd] question regarding lang2 command in C

2014-04-02 Thread Romain François
Hi, This is easy if the gender and age are already vectors of some sort of the same size. SEXP df = PROTECT(allocVector(VECSXP, 2)); SET_VECTOR_ELT(df,0,gender) ; SET_VECTOR_ELT(df,1,age) ; SEXP names = PROTECT(allocVector(STRSXP,2)); SET_STRING_ELT(names,0,mkChar("age")) SET_STRING_ELT(names

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Kevin Ushey
Hi Duncan, Thanks a ton -- I appreciate your taking the time to investigate this, and especially even checking into the IEEE standard to clarify. Cheers, Kevin On Mon, Feb 10, 2014 at 11:54 AM, Rainer M Krug wrote: > > > On 02/10/14, 19:07 , Duncan Murdoch wrote: >> On 10/02/2014 10:21 AM, Tim

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Rainer M Krug
On 02/10/14, 19:07 , Duncan Murdoch wrote: > On 10/02/2014 10:21 AM, Tim Hesterberg wrote: >> This isn't quite what you were asking, but might inform your choice. >> >> R doesn't try to maintain the distinction between NA and NaN when >> doing calculations, e.g.: >> > NA + NaN >> [1] NA >> > NaN

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Duncan Murdoch
On 10/02/2014 1:43 PM, Kevin Ushey wrote: Also, similarly, to clarify, should there be _one_ unique bit pattern for R's NA_REAL, or two? Because I see (for a function hex that produces the hex representation of a number): > hex(NA_real_) [1] "7FF007A2" > hex(NA_real_+1) [1] "7FF8

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Duncan Murdoch
On 10/02/2014 1:43 PM, Kevin Ushey wrote: Also, similarly, to clarify, should there be _one_ unique bit pattern for R's NA_REAL, or two? Because I see (for a function hex that produces the hex representation of a number): I don't think the language definition defines bit patterns, it defines b

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Kevin Ushey
Also, similarly, to clarify, should there be _one_ unique bit pattern for R's NA_REAL, or two? Because I see (for a function hex that produces the hex representation of a number): > hex(NA_real_) [1] "7FF007A2" > hex(NA_real_+1) [1] "7FF807A2" > hex(NaN) [1] "7FF8" Thi

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Duncan Murdoch
On 10/02/2014 10:21 AM, Tim Hesterberg wrote: This isn't quite what you were asking, but might inform your choice. R doesn't try to maintain the distinction between NA and NaN when doing calculations, e.g.: > NA + NaN [1] NA > NaN + NA [1] NaN So for the aggregate package, I didn't attempt to tr

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Kevin Ushey
Thanks Tim, this is exactly the explanation I was hoping to see. Much appreciated! On Mon, Feb 10, 2014 at 7:21 AM, Tim Hesterberg wrote: > This isn't quite what you were asking, but might inform your choice. > > R doesn't try to maintain the distinction between NA and NaN when > doing calculatio

Re: [Rd] Question re: NA, NaNs in R

2014-02-10 Thread Tim Hesterberg
This isn't quite what you were asking, but might inform your choice. R doesn't try to maintain the distinction between NA and NaN when doing calculations, e.g.: > NA + NaN [1] NA > NaN + NA [1] NaN So for the aggregate package, I didn't attempt to treat them differently. The aggregate package is

Re: [Rd] Question re: NA, NaNs in R

2014-02-09 Thread Prof Brian Ripley
There is one NA but mulitple NaNs. And please re-read 'man memcmp': your cast is wrong. On 10/02/2014 06:52, Kevin Ushey wrote: Hi R-devel, I have a question about the differentiation between NA and NaN values as implemented in R. In arithmetic.c, we have int R_IsNA(double x) { if (isnan

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Paul Gilbert
On 13-10-20 04:58 PM, Gabor Grothendieck wrote: On Sun, Oct 20, 2013 at 4:49 PM, Duncan Murdoch wrote: On 13-10-20 4:43 PM, Jonathan Greenberg wrote: I'm working on an update for my CRAN package "spatial.tools" and I noticed a new warning when running R CMD CHECK --as-cran: * checking CRAN

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Duncan Murdoch
On 13-10-20 6:41 PM, Jonathan Greenberg wrote: To be clear, if I used Depends: somepackage before, and switched over to using Imports: somepackage, I'll need to mod my code that used to have a call to, say, somefunction to now have somepackage::somefunction, correct? No. You need to modify bot

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Gabriel Becker
Jonathan, import/importFrom directives within the NAMESPACE places the symbol(s) within your package's namespace. They are treated exactly the same as (non-exported) symbols your code defines. ~G On Sun, Oct 20, 2013 at 3:41 PM, Jonathan Greenberg wrote: > To be clear, if I used Depends: somep

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Duncan Murdoch
On 13-10-20 4:54 PM, Jonathan Greenberg wrote: Duncan: Thanks -- learning something new today -- quick follow-up, will using the import statements in the NAMESPACE, when a user goes to install.packages(), auto-install the "dependent" packages the same way Depends forces? You need to list the

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Jonathan Greenberg
To be clear, if I used Depends: somepackage before, and switched over to using Imports: somepackage, I'll need to mod my code that used to have a call to, say, somefunction to now have somepackage::somefunction, correct? --j On Sun, Oct 20, 2013 at 5:34 PM, Dirk Eddelbuettel wrote: > > On 20 O

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Dirk Eddelbuettel
On 20 October 2013 at 16:20, Jonathan Greenberg wrote: | One more follow-up -- will I now need to include a library() statement in | each function? No. NAMESPACE entry, coupled with Imports: in DESCRIPTION. Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com __

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Jonathan Greenberg
One more follow-up -- will I now need to include a library() statement in each function? --j On Sun, Oct 20, 2013 at 3:58 PM, Gabor Grothendieck wrote: > On Sun, Oct 20, 2013 at 4:49 PM, Duncan Murdoch > wrote: > > On 13-10-20 4:43 PM, Jonathan Greenberg wrote: > >> > >> I'm working on an upd

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Gabor Grothendieck
On Sun, Oct 20, 2013 at 4:49 PM, Duncan Murdoch wrote: > On 13-10-20 4:43 PM, Jonathan Greenberg wrote: >> >> I'm working on an update for my CRAN package "spatial.tools" and I noticed >> a new warning when running R CMD CHECK --as-cran: >> >> * checking CRAN incoming feasibility ... NOTE >> Maint

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Jonathan Greenberg
Duncan: Thanks -- learning something new today -- quick follow-up, will using the import statements in the NAMESPACE, when a user goes to install.packages(), auto-install the "dependent" packages the same way Depends forces? --j On Sun, Oct 20, 2013 at 3:49 PM, Duncan Murdoch wrote: > On 13-10

Re: [Rd] Question about selective importing of package functions...

2013-10-20 Thread Duncan Murdoch
On 13-10-20 4:43 PM, Jonathan Greenberg wrote: I'm working on an update for my CRAN package "spatial.tools" and I noticed a new warning when running R CMD CHECK --as-cran: * checking CRAN incoming feasibility ... NOTE Maintainer: 'Jonathan Asher Greenberg ' Depends: includes the non-default pack

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Hodgess, Erin
udasize > ### Keywords: package > > ### ** Examples > > require(cudasize) > z <- .Call("cuda4",1L,"5") Error in .Call("cuda4", 1L, "5") : C symbol name "cuda4" not in load table Execution halted c:\Program Files\R\R-3.0.1\bin\i

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Hodgess, Erin
Wow! This is just amazing! Thanks so much. I didn't realize how intense this is. From: Duncan Temple Lang [dtemplel...@ucdavis.edu] Sent: Thursday, July 18, 2013 3:08 PM To: Hodgess, Erin Cc: r-devel@r-project.org Subject: Re: [Rd] question

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Duncan Temple Lang
s.character(5)) : > C symbol name "cuda4" not in load table > Execution halted > > c:\Program Files\R\R-3.0.1\bin\i386> > > I still want to keep at it. > > Thanks so much for all of your help!!! > > Erin > > ___

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Hodgess, Erin
p!!! Erin From: Duncan Temple Lang [dtemplel...@ucdavis.edu] Sent: Thursday, July 18, 2013 1:09 PM To: Hodgess, Erin Cc: r-devel@r-project.org Subject: Re: [Rd] question about Makeconf and nvcc/CUDA Hi Erin It appears that there is only one file in src that i

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Duncan Temple Lang
rray and copy it to CUDA device > for (int i=0; i cudaMemcpy(a_d, a_h, size, cudaMemcpyHostToDevice); > // Do calculation on device: > int block_size = 4; > int n_blocks = N/block_size + (N%block_size == 0 ? 0:1); > square_array <<< n_blocks, block_size >>>

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Hodgess, Erin
Hi again: Here is another problem that I am having. Hope this will be the last one. I really want to see if I can put it together. Sorry for belaboring the issue. Well, here is my story: c:\Program Files\R\R-3.0.1\bin\i386>R CMD build cudasize R CMD build cudasize * checking for file 'cudasi

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Duncan Temple Lang
Hi Erin Glad you are making progress on this with Brian's help. I thought I would mention a different approach that might save you some programming time and actually make the code more flexible at the same time. Basically, in a high-level language like R, it is nice to keep the code calling a

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Prof Brian Ripley
fe2.gpu cuda4.cu tmpxft_13d4_-5_cuda4.cudafe1.cpp tmpxft_13d4_-15_cuda4.ii So that is my situation. This is Windows 7, R version 3.0.1 Thanks, Erin From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf of Prof Brian Ripley

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Hodgess, Erin
4_-15_cuda4.ii So that is my situation. This is Windows 7, R version 3.0.1 Thanks, Erin From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] on behalf of Prof Brian Ripley [rip...@stats.ox.ac.uk] Sent: Thursday, July 18, 2013 2:44 AM To: r-d

Re: [Rd] question about Makeconf and nvcc/CUDA

2013-07-18 Thread Prof Brian Ripley
On 18/07/2013 07:45, Hodgess, Erin wrote: Dear R development: I'm not sure if this is the appropriate list, but it's a start. I would like to put together a package which contains a CUDA program on Windows 7. I believe that it has to do with the Makeconf file in the etc directory. That

Re: [Rd] Question about writing portable packages

2013-06-08 Thread Gray
Kevin Ushey: (12:10AM on Fri, Jun 07) I think the key word here is _other_ packages. It's entirely okay to call your package's own compiled code through the .Call interface (and the code you write may link to other packages; the obvious example being Rcpp code you write); however, it is not porta

Re: [Rd] Question about writing portable packages

2013-06-07 Thread Guillermo.Vinue
Dear Kevin, Berwin and Gabriel, Thank you very much for your detailed and clear answers. According to your comments, in a few days I will submit my package to CRAN. I would also like to take this opportunity to thank all the R-devel list for being a wonderful place to discuss and clarify doubts

Re: [Rd] Question about writing portable packages

2013-06-07 Thread Kevin Ushey
I think the key word here is _other_ packages. It's entirely okay to call your package's own compiled code through the .Call interface (and the code you write may link to other packages; the obvious example being Rcpp code you write); however, it is not portable to use .Call to call compiled code f

Re: [Rd] Question about writing portable packages

2013-06-07 Thread Gabriel Becker
Guillermo, That phrase is referring to using .Call in your package to call a C function that shipped with a DIFFERENT package or is part of R itself (defined in the R source code). As long as you are only calling C functions you define in the C++ code that ships with your package you are fine. ~

Re: [Rd] question re: error message --- package error: "functionName" not resolved from current namespace

2013-04-11 Thread brian avants
hi martin that is extremely clarifying - and perfectly fixed our problems! i did read that comment in the release notes but failed to appreciate its significance - it does make sense to do it this way for both the performance improvements & safety issues mentioned in ?.Call. especially in a pac

Re: [Rd] question re: error message --- package error: "functionName" not resolved from current namespace

2013-04-10 Thread Martin Morgan
For what it's worth, the package loads many DLLs in its NAMESPACE via repeated calls to useDynLib. antsImageRead is not in the first DLL loaded, and from NEWS.Rd, the problem comes from o A foreign function call (.C() etc) in a package without a PACKAGE argument will only look in

Re: [Rd] question re: error message --- package error: "functionName" not resolved from current namespace

2013-04-10 Thread Duncan Murdoch
On 13-04-10 5:35 PM, brian avants wrote: Thank you for the advice - the function formed like this: antsImageRead <- function( filename , dimension , pixeltype = "float" ) { rval <- (.Call("antsImageRead", filename, pixeltype, dimension)) return(rval) } worked up to R 2.15.x but fai

Re: [Rd] question re: error message --- package error: "functionName" not resolved from current namespace

2013-04-10 Thread brian avants
Thank you for the advice - the function formed like this: antsImageRead <- function( filename , dimension , pixeltype = "float" ) { rval <- (.Call("antsImageRead", filename, pixeltype, dimension)) return(rval) } worked up to R 2.15.x but fails in R 3.0.x if i include the PACKAGE = 'wh

Re: [Rd] question re: error message --- package error: "functionName" not resolved from current namespace

2013-04-10 Thread Duncan Murdoch
On 10/04/2013 2:25 PM, brian avants wrote: hi simon thank you for your questions answers here: I won't answer your question directly but some suggestions: > a) does adding PACKAGE="ANTsR" to .Call change anything? (It should really > be there if you are using strings as names) > this does

Re: [Rd] question re: error message --- package error: "functionName" not resolved from current namespace

2013-04-10 Thread brian avants
hi simon thank you for your questions answers here: I won't answer your question directly but some suggestions: > a) does adding PACKAGE="ANTsR" to .Call change anything? (It should really > be there if you are using strings as names) > this does change things for instance, this works:

Re: [Rd] question re: error message --- package error: "functionName" not resolved from current namespace

2013-04-10 Thread Simon Urbanek
On Apr 10, 2013, at 1:53 PM, brian avants wrote: > hello everyone > > we are developing a package that has worked up until R3.0 which we just > tested. > > the issue is as above when we call a function that works in R 2.15.2 > from R 3.0 we get an error > > Error in .Call("antsImageRead"

Re: [Rd] question on why Rigroup package moved to Archive on CRAN

2013-03-10 Thread Uwe Ligges
OK, the original message will be resend privately in a minute. Best, Uwe Ligges On 10.03.2013 16:54, Kevin Hendricks wrote: Sorry if you considered this a waste of bandwidth. I did not know CRAN had its own mailing list. The reason I never responded to any mail is that I never received a

Re: [Rd] question on why Rigroup package moved to Archive on CRAN

2013-03-10 Thread Kevin Hendricks
Sorry if you considered this a waste of bandwidth. I did not know CRAN had its own mailing list. The reason I never responded to any mail is that I never received any message in January (I searched my inbox for it and found nothing). It probably was stripped out by the sympatico mail server

Re: [Rd] question on why Rigroup package moved to Archive on CRAN

2013-03-10 Thread Jari Oksanen
"What we've got here is failure to communicate. Some men you just can't reach. So you get what we had here last week, which is the way he wants it. Well, he gets it. I don't like it any more than you men." (from "Cool hand Luke" -- but whose fault?) Cheers, Jari Oksanen On 10/03/2013, at 17:18

Re: [Rd] question on why Rigroup package moved to Archive on CRAN

2013-03-10 Thread Uwe Ligges
I wonder why you do not ask on CRAN@...? List members here cannot know the answer. And we typically do not discuss such matters in public. I wonder why you do not read the e-mail message you get from the CRAN team? Please see the message with subject line "Registering .External entry points" y

Re: [Rd] question on why Rigroup package moved to Archive on CRAN

2013-03-09 Thread Kevin Hendricks
Hi Dan, In case this catches anyone else ... FWIW, I found the issue ... in my Rinit.c, my package uses the .External call which actually takes one SEXP which points to a "varargs-like" list. Under 2.15.X and earlier, I thought the proper entry for an .External call was as below since it onl

  1   2   3   >