Re: [Rd] C_LogLin (stats/loglin)

2015-10-22 Thread Kai Nitschke
Hi Gabriel, it actually works with: z <- .Call(stats:::C_LogLin, dtab, conf, table, start, nmar, eps, iter). This helps me a great deal. I will inform myself further about SEXPs. Thank you very much, Kai Zitat von Gabriel Becker : Kai, Apologies for the double message, it didn't go to t

Re: [Rd] Best way to implement optional functions?

2015-10-22 Thread Paul Gilbert
On 10/22/2015 03:55 PM, Duncan Murdoch wrote: I'm planning on adding some new WebGL functionality to the rgl package, but it will pull in a very large number of dependencies. Since many people won't need it, I'd like to make the new parts optional. The general idea I'm thinking of is to put th

Re: [Rd] Changed behaviour when passing a function?

2015-10-22 Thread Duncan Murdoch
On 22/10/2015 5:44 PM, Gabriel Becker wrote: Of course (and unsurprisingly) Duncan is correct. I see that behavior in R 3.1.0, as well as the modern ones Duncan mentioned. What I said is true, as far as it goes, but the symbol being resolved is FUN, so when looking for a function it doesn't f

Re: [Rd] Changed behaviour when passing a function?

2015-10-22 Thread Gabriel Becker
Of course (and unsurprisingly) Duncan is correct. I see that behavior in R 3.1.0, as well as the modern ones Duncan mentioned. What I said is true, as far as it goes, but the symbol being resolved is FUN, so when looking for a function it doesn't find the function version of round. Did you perha

Re: [Rd] Changed behaviour when passing a function?

2015-10-22 Thread Duncan Murdoch
On 22/10/2015 1:59 PM, Joris Meys wrote: Hi all, When teaching this year's class, I was quite amazed that one of my examples didn't work any longer. I wanted to illustrate the importance of match.fun() with following code: myfun <- function(x, FUN, ...){ FUN(x, ...) } round <- 2 myfun(0.85

Re: [Rd] Changed behaviour when passing a function?

2015-10-22 Thread Gabriel Becker
Joris, When a function call (detected via the parenthesis) R does the equivalent of get(..., mode="function") to resolve the symbol. > round = 2 > round(5.3) [1] 5 > get("round") [1] 2 > get("round", mode = "function") function (x, digits = 0) .Primitive("round") It's done this for a while, b

Re: [Rd] Best way to implement optional functions?

2015-10-22 Thread Dirk Eddelbuettel
On 22 October 2015 at 15:08, Brian G. Peterson wrote: | On Thu, 2015-10-22 at 15:55 -0400, Duncan Murdoch wrote: | > I'm planning on adding some new WebGL functionality to the rgl package, | > but it will pull in a very large number of dependencies. Since many | > people won't need it, I'd like

Re: [Rd] Best way to implement optional functions?

2015-10-22 Thread Brian G. Peterson
On Thu, 2015-10-22 at 15:55 -0400, Duncan Murdoch wrote: > I'm planning on adding some new WebGL functionality to the rgl package, > but it will pull in a very large number of dependencies. Since many > people won't need it, I'd like to make the new parts optional. > > The general idea I'm think

[Rd] Best way to implement optional functions?

2015-10-22 Thread Duncan Murdoch
I'm planning on adding some new WebGL functionality to the rgl package, but it will pull in a very large number of dependencies. Since many people won't need it, I'd like to make the new parts optional. The general idea I'm thinking of is to put the new stuff into a separate package, and have

Re: [Rd] Missing parenthesis in R-exts.texi

2015-10-22 Thread Duncan Murdoch
On 22/10/2015 2:38 PM, Dirk Eddelbuettel wrote: Line 1204 (right now) of svn/r-devel/doc/manual/R-exts.texi has dest <- file.path(R_PACKAGE_DIR, paste0('bin', R_ARCH) which lacks a closing ) -- two open, only one close right now. Dirk [1] I would have reported a bug, but I am aware of a r

[Rd] Missing parenthesis in R-exts.texi

2015-10-22 Thread Dirk Eddelbuettel
Line 1204 (right now) of svn/r-devel/doc/manual/R-exts.texi has dest <- file.path(R_PACKAGE_DIR, paste0('bin', R_ARCH) which lacks a closing ) -- two open, only one close right now. Dirk [1] I would have reported a bug, but I am aware of a recent and not-so-friendly response when bugzilla w

Re: [Rd] R CMD check --as-cran without qpdf

2015-10-22 Thread Duncan Murdoch
On 10/10/2015 6:30 AM, Kirill Müller wrote: Today, a package that has an HTML vignette (but no PDF vignette) failed R CMD check --as-cran on a system without qpdf. I think the warning originates here [1], due to a premature check for the existence of qpdf [2]. Setting R_QPDF=true (as in /bin/true

[Rd] Changed behaviour when passing a function?

2015-10-22 Thread Joris Meys
Hi all, When teaching this year's class, I was quite amazed that one of my examples didn't work any longer. I wanted to illustrate the importance of match.fun() with following code: myfun <- function(x, FUN, ...){ FUN(x, ...) } round <- 2 myfun(0.85, FUN = round, digits=1) I expected to see

Re: [Rd] C_LogLin (stats/loglin)

2015-10-22 Thread Gabriel Becker
Kai, Apologies for the double message, it didn't go to the list last time. On Thu, Oct 22, 2015 at 9:59 AM, Kai Nitschke < kai.nitsc...@uniklinik-freiburg.de> wrote: > > “.Call” calls the C/C++ function “C_LogLin”. But when I am running it line > by line I get > the following error on line 23/24

[Rd] C_LogLin (stats/loglin)

2015-10-22 Thread Kai Nitschke
Hi everyone, I have a question regarding a C function of the "stats" package in R. I tried to understand the “loglin” basic function of the “stats” package implemented in R. The implemented function itself runs without any problem (perhaps see sample). When I ran it line by line it stopped a

[Rd] alternative read.arff function for the package foreign

2015-10-22 Thread Juan Manuel Barreneche
​Hello everyone, I guess this is really directed to the R Core Team, but I understand that this is the best channel to submit this (please correct me if I'm wrong!). I would like to submit a function to consideration, as an upgrade for the current read.arff in package foreign. Code in github: htt

Re: [Rd] rank(, ties.method="last")

2015-10-22 Thread Martin Maechler
> Suharto Anggono Suharto Anggono via R-devel > on Wed, 21 Oct 2015 22:44:57 -0700 writes: > -- > Henric Winell <[hidden email]> > on Wed, 21 Oct 2015 13:43:02 +0200 writes: >> Den 2015-10-21 kl. 07:24, skrev Suharto Anggono Suharto Anggono via R-