Re: [Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Bo Peng
> There was a couple of posts about this recently: > > https://stat.ethz.ch/pipermail/r-devel/2005-April/subject.html > I am too new to this list to see these discussions. They are quite interesting! Certainly I was not aware of the big differences between C++/Python OOP and S3/S4 OOP. This exp

Re: [Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Bo Peng
> SWIG is a very nice idea. ... SWIG is a wonderful tool that makes wrapping C++ code super-easy. I can write pure C++ code and even test them by writing a main() function. Then, using a simple interface file, all my C++ classes becomes Python (shadow) classes like magic. It will take much more t

Re: [Rd] installing packages and libraries

2005-07-04 Thread Gabor Grothendieck
I figured it out. There were quotes around the semicolon separated path. When I removed them it worked. On 7/4/05, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > When I run the following: > > cd \Rpkgs > rcmd install mypackage -l library > > I get a message that it cannot find quadprog which

Re: [Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Simon Urbanek
On Jul 4, 2005, at 1:01 PM, Bo Peng wrote: > From what I read from R website, it is easy to wrap individual C/C+ > + functions but not C++ classes. There was a couple of posts about this recently: https://stat.ethz.ch/pipermail/r-devel/2005-April/subject.html Look for the posts concerning C++,

Re: [Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Gabor Grothendieck
On 7/4/05, Bo Peng <[EMAIL PROTECTED]> wrote: > > > * Wrap C++ class hierarchy. Virtual functions need to be supported. > > > (SWIG can generate Python shadow classes that behave almost exactly > > > like the underlying C++ classes) > > > > This is hard to do in R, because the R object model is qui

Re: [Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Douglas Bates
On 7/4/05, Bo Peng <[EMAIL PROTECTED]> wrote: > > > * Wrap C++ class hierarchy. Virtual functions need to be supported. > > > (SWIG can generate Python shadow classes that behave almost exactly > > > like the underlying C++ classes) > > > > This is hard to do in R, because the R object model is qui

Re: [Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Bo Peng
> > * Wrap C++ class hierarchy. Virtual functions need to be supported. > > (SWIG can generate Python shadow classes that behave almost exactly > > like the underlying C++ classes) > > This is hard to do in R, because the R object model is quite different > from that of C++ (whereas Python's is mo

Re: [Rd] segmentation fault after max level of parenthesis (PR#7990)

2005-07-04 Thread Thomas Lumley
Already fixed, I believe. -thomas On Mon, 4 Jul 2005 [EMAIL PROTECTED] wrote: > Full_Name: Matthias Laabs > Version: 2.1.0 (source compiled) > OS: debian linux (sarge) > Submission from: (NULL) (195.143.236.2) > > > Hi! > R crashes with a segmentation fault when I use more than 85 paren

[Rd] installing packages and libraries

2005-07-04 Thread Gabor Grothendieck
When I run the following: cd \Rpkgs rcmd install mypackage -l library I get a message that it cannot find quadprog which is a library that mypackage depends on. Error: package 'quadprog' could not be loaded I previously used C:\Program Files\R\rw2011\library as my library for CRAN pack

Re: [Rd] [R] How to convert "c:\a\b" to "c:/a/b"

2005-07-04 Thread Gabor Grothendieck
The readLines example, as written, does not work in sourced files and therefore will not work in the Examples section of .Rd pages either. Currently readLines does not process its input and I think it would not be a good idea to change that philosophy. On 7/4/05, Spencer Graves <[EMAIL PROTECTED

Re: [Rd] [R] How to convert "c:\a\b" to "c:/a/b"

2005-07-04 Thread Spencer Graves
ANOTHER EXAMPLE FOR "gsub"? I would like to suggest that some version of Prof. Ripley's answer to my recent post to r-help (subject as above) be added to the "Examples" for "gsub": ## CAUTION: XEmacs may hang on "readLines" ## unless submitted by itself (x <- readLines(stdin(), n=1))

Re: [Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Duncan Murdoch
On 7/4/2005 1:01 PM, Bo Peng wrote: > Dear list, > > I have developed a forward-time population genetics simulation > environment simuPOP, which is a set of C++ (template) > classes/functions wrapped by SWIG as Python libraries. R is used > extensively as plotting and statistical analysis engine t

[Rd] How difficult is it to wrap a large C++ library with R?

2005-07-04 Thread Bo Peng
Dear list, I have developed a forward-time population genetics simulation environment simuPOP, which is a set of C++ (template) classes/functions wrapped by SWIG as Python libraries. R is used extensively as plotting and statistical analysis engine through RPy package. I use Python to wrap simuPO

[Rd] segmentation fault after max level of parenthesis (PR#7990)

2005-07-04 Thread matthias . laabs
Full_Name: Matthias Laabs Version: 2.1.0 (source compiled) OS: debian linux (sarge) Submission from: (NULL) (195.143.236.2) Hi! R crashes with a segmentation fault when I use more than 85 parenthesis (it actually happened by accidently hitting a wrong shortcut in emacs ... ) code: sum(

Re: [Rd] Compiling R scripts

2005-07-04 Thread Barry Rowlingson
Uzuner, Tolga wrote: > Dear R Developers, > It would help if R scripts could be compiled into an executable, or a > library. Are you sure it would help? If you do a big matrix operation in R it runs at the speed of the underlying C code. It wont get much faster. Profile your code, find out wh

[Rd] Compiling R scripts

2005-07-04 Thread Uzuner, Tolga
Dear R Developers, A recommendation for future development. It would help if R scripts could be compiled into an executable, or a library. Speed is the main issue (I run a large scale monte carlo in R which is very slow). However, it would also make it easier to link R into other applications,

Re: [Rd] eigen of a real pd symmetric matrix gives NaNs in $vector (PR#7989)

2005-07-04 Thread pburns
I would presume this is another manifestation of what I reported (reproduced below) on 2003-12-01. [EMAIL PROTECTED] wrote: >Full_Name: cajo ter Braak >Version: 2.1.1 >OS: Windows >Submission from: (NULL) (137.224.10.105) > > ># I would like to attach the matrix C in the Rdata file; it is 50x50 a

Re: [Rd] eigen of a real pd symmetric matrix gives NaNs in $vector (PR#7987)

2005-07-04 Thread Patrick Burns
I would presume this is another manifestation of what I reported (reproduced below) on 2003-12-01. [EMAIL PROTECTED] wrote: >Full_Name: cajo ter Braak >Version: 2.1.1 >OS: Windows >Submission from: (NULL) (137.224.10.105) > > ># I would like to attach the matrix C in the Rdata file; it is 50x50 a

[Rd] prototypes for z_sin() and z_cos()

2005-07-04 Thread Robin Hankin
Hi I have been looking at complex.c and want to access z_cos() and z_sin () from C in one of my packages. There doesn't seem to be a corresponding header file: there is no complex.h file. Where are the prototypes of z_sin() and z_cos() for these functions? grepping didn't help me:

[Rd] eigen of a real pd symmetric matrix gives NaNs in $vector (PR#7987)

2005-07-04 Thread cajo . terbraak
Full_Name: cajo ter Braak Version: 2.1.1 OS: Windows Submission from: (NULL) (137.224.10.105) # I would like to attach the matrix C in the Rdata file; it is 50x50 and comes from a geostatistical problem (spherical covariogram) > rm(list=ls(all=TRUE)) > load(file= "test.eigen.Rdata") > ls() [1] "

Re: [Rd] (PR#7976) split() dropping levels (was "boxplot by factor")

2005-07-04 Thread Martin Maechler
[ Hmm, is everyone of those interested in changes inside R "sleeping" , uninterested, ... ] > "MM" == Martin Maechler <[EMAIL PROTECTED]> > on Fri, 1 Jul 2005 18:36:54 +0200 writes: > "PD" == Peter Dalgaard <[EMAIL PROTECTED]> > on 28 Jun 2005 14:57:42 +0200 writes: