[Rd] Portability of a C function

2010-02-14 Thread Christophe Genolini
Hi the list, In a package P1, I write a function f1 in C, potentially an internal function (not to be called from R). In a package P2, I write a function f2 in C. The f2 function needs to use f1 from P1. Is it possible ? --- 8< In file P1.c - double f1(x,y){ } --- 8<

Re: [Rd] Portability of a C function

2010-02-14 Thread Romain Francois
Hello, This was discussed this week in the thread "LinkingTo and C++". It is possible, and documented in WRE section 5.4 : http://cran.r-project.org/doc/manuals/R-exts.html#Registering-native-routines Romain On 02/14/2010 12:58 PM, Christophe Genolini wrote: Hi the list, In a package P1,

Re: [Rd] Portability of a C function

2010-02-14 Thread Dirk Eddelbuettel
On 14 February 2010 at 12:58, Christophe Genolini wrote: | Hi the list, | | In a package P1, I write a function f1 in C, potentially an internal | function (not to be called from R). | In a package P2, I write a function f2 in C. The f2 function needs to | use f1 from P1. Is it possible ? Yes.

[Rd] Feature Request: Multiline Comments

2010-02-14 Thread Saptarshi Guha
Hello, Is it possible to extend the R lexer/parser to include multiline comments like /* acomment */ ? This way I can integrate emacs org-mode with my R code, so that I can have a table of contents, section folding, html-output of source etc. e.g /* * Display Code */ #+BEGIN_SRC R foo <- functio

[Rd] How S3method() is implemented and called? And when to use it?

2010-02-14 Thread blue sky
R-exts.pdf discribes S3method a little bit. But I want to understand more on how it is called, implemented and when to use it. I don't find it in an R session. But I see S3method() in some NAMESPACE files. > S3method Error: object 'S3method' not found > ?S3method No documentation for 'S3method' i

Re: [Rd] How S3method() is implemented and called? And when to use it?

2010-02-14 Thread Romain Francois
Hello `Blue Sky` , Will you please start posting under your real name. As documented in WRE, S3method is meant for use in namespaces: http://cran.r-project.org/doc/manuals/R-exts.html#Registering-S3-methods It is not an R function. Romain On 02/14/2010 07:32 PM, blue sky wrote: R-exts.pdf d

[Rd] R CMD INSTALL customization; followup on Dirk's question

2010-02-14 Thread Paul Johnson
Last year, Dirk E was asking about customizing options to for packages when using R CMD INSTALL http://tolstoy.newcastle.edu.au/R/e4/devel/08/06/1980.html Has there been more on that question lately? I also wonder what this means in the "Building Packages" section of the R-Extensions manual: "R

Re: [Rd] Portability of a C function

2010-02-14 Thread Christophe Genolini
Thanks, this helps a lot. So if I understand correctly: in package P1, I want to export printMatrix and printMatrixInt. In my file P1.c, I have to add void R_init_P1(DllInfo *info){ R_registerCCallable("longitudinalData","printMatrix",printMatrix); R_registerCCallable("longitudinalData",

Re: [Rd] Portability of a C function

2010-02-14 Thread J Ryan
Take a look here, as this may help clear up the unanswered questions: https://stat.ethz.ch/pipermail/r-devel/2008-November/051262.html HTH Jeff Jeffrey A. Ryan jeffrey.r...@insightalgo.com ia: insight algorithmics www.insightalgo.com On Feb 14, 2010, at 3:18 PM, Christophe Genolini paris10.fr

Re: [Rd] Feature Request: Multiline Comments

2010-02-14 Thread Ben Bolker
Saptarshi Guha gmail.com> writes: > > Hello, > Is it possible to extend the R lexer/parser to include multiline comments like > /* > acomment > > */ > ? > This way I can integrate emacs org-mode with my R code, so that I can > have a table of contents, > section folding, html-output of source e

[Rd] org-mode (was Re: Feature Request: Multiline Comments)

2010-02-14 Thread Martin Morgan
On 02/14/2010 08:11 AM, Saptarshi Guha wrote: > Hello, > Is it possible to extend the R lexer/parser to include multiline comments like > /* > acomment > > */ > ? > This way I can integrate emacs org-mode with my R code, so that I can > have a table of contents, > section folding, html-output of s

Re: [Rd] org-mode (was Re: Feature Request: Multiline Comments)

2010-02-14 Thread Erik Iverson
Martin Morgan wrote: On 02/14/2010 08:11 AM, Saptarshi Guha wrote: Hello, Is it possible to extend the R lexer/parser to include multiline comments like /* acomment */ ? This way I can integrate emacs org-mode with my R code, so that I can have a table of contents, section folding, html-outp

Re: [Rd] Incorrect Kendall's tau for ordered variables (PR#14207)

2010-02-14 Thread Prof Brian Ripley
What seems a more serious error is that the current code (and Peter's modification) returns correlations computed from unordered factors, and there are examples in packages 'agsemisc', 'ggm' and 'mi'. And in all cases these are Pearson correlations, as is the use of ordered factors in 'sfsmisc'.