[Rd] Copyright on src/nmath/qnorm.c

2010-02-11 Thread David Heffernan
At the top of src/nmath/qnorm.c it is stated: * Copyright (C) 1998 Ross Ihaka * Copyright (C) 2000--2005 The R Development Core Team * based on AS 111 (C) 1977 Royal Statistical Society * and on AS 241 (C) 1988 Royal Statistical Society The routine is in fact an f2c'd version of

[Rd] Rounding multinomial proportions

2010-02-11 Thread Arni Magnusson
I present you with a function that solves a problem that has bugged me for many years. I think the problem may be general enough to at least consider adding this function, or a revamped version of it, to the 'stats' package, with the other multinomial functions reside. I'm using R to export

[Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
Hello, I've been trying to make LinkingTo work when the package linked to has c++ code. I've put dumb packages to illustrate this emails here ; http://addictedtor.free.fr/misc/linkingto Package A defines this C++ class: class A { public: A() ; ~A() ; SEXP hello() ;

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
On 02/11/2010 10:08 AM, Romain Francois wrote: Hello, I've been trying to make LinkingTo work when the package linked to has c++ code. I've put dumb packages to illustrate this emails here ; http://addictedtor.free.fr/misc/linkingto Package A defines this C++ class: class A { public: A() ;

Re: [Rd] Rounding multinomial proportions

2010-02-11 Thread Arni Magnusson
Ugh, I made a typo at the very heart of my message: when I preprocess each line in R as p-a/sum(a), occasionally a line will sum to 0.999, 1.002, or the like should be when I preprocess each line in R as p-round(a/sum(a),3) occasionally a line will sum to 0.999, 1.002, or the like Also,

Re: [Rd] Copyright on src/nmath/qnorm.c

2010-02-11 Thread Peter Dalgaard
David Heffernan wrote: At the top of src/nmath/qnorm.c it is stated: * Copyright (C) 1998 Ross Ihaka * Copyright (C) 2000--2005 The R Development Core Team * based on AS 111 (C) 1977 Royal Statistical Society * and on AS 241 (C) 1988 Royal Statistical Society The routine

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Simon Urbanek
Romain, I think your'e confusing two entirely different concepts here: 1) LinkingTo: allows a package to provide C-level functions to other packages (see R-ext 5.4). Let's say package A provides a function foo by calling R_RegisterCCallable for that function. If a package B wants to use that

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
Thanks. On 02/11/2010 05:55 PM, Simon Urbanek wrote: Romain, I think your'e confusing two entirely different concepts here: Yes. The name LinkingTo probably helped my confusion. 1) LinkingTo: allows a package to provide C-level functions to other packages (see R-ext 5.4). Let's say

Re: [Rd] R crashes when setWinProgressBar is give a numeric value for label argument

2010-02-11 Thread Greg Snow
Thanks, I would be happy with an error that did not crash R, coercion just makes life a little easier, but I can live without that if you are not sure or there are reasons not to (speed being on possibility). It looks like you just underestimated how stupid I could be. Thanks, -- Gregory

Re: [Rd] LinkingTo and C++

2010-02-11 Thread Romain Francois
On 02/11/2010 07:40 PM, Simon Urbanek wrote: On Feb 11, 2010, at 12:24 PM, Romain Francois wrote: Thanks. On 02/11/2010 05:55 PM, Simon Urbanek wrote: Romain, I think your'e confusing two entirely different concepts here: Yes. The name LinkingTo probably helped my confusion.

Re: [Rd] Compiling R projects with multiple external libraries

2010-02-11 Thread Seth Falcon
On 2/11/10 9:43 AM, rt wrote: Hi, I have just learned how to use compile and link libraries using make and how to create R projects using R CMD build or INSTALL. My understanding of both is somewhat limited and hence the question. I have a main library written in c which depends on other

[Rd] Darwinian software development and the library function

2010-02-11 Thread Charlotte Maia
Hi all, Legend has it, that polite R programmers don't overwrite, say, the print function. However, this seems quite un-Darwinian to me (especially given that I don't want to call all my arguments x and y). I might want a function print.foo (myfoo, ...). So I decided to be very impolite (in one

[Rd] filenames with special characters in the R/ directory of a package?

2010-02-11 Thread blue sky
According to R-exts.pdf (page 3): For maximal portability filenames should only contain only ASCII characters not excluded already (that is A-Za-z0-9._!#$%+,;=...@^(){}’[] I have some files with special characters like '[' and '%' e.g. '[.set.R'. I also have some functions that also have those