Re: [Rd] C++ in an R package

2006-08-02 Thread Kasper Daniel Hansen
On Aug 2, 2006, at 11:04 PM, Selwyn-Lloyd McPherson wrote: > Oh, of course, a few minutes after asking, I think I've figured it > out. :) But, out of curiosity, even if I have a C++ program > "whatever.cpp" in /src, there is no "whatever" file in the > installation directory; where is that inform

Re: [Rd] C++ in an R package

2006-08-02 Thread Selwyn-Lloyd McPherson
Oh, of course, a few minutes after asking, I think I've figured it out. :) But, out of curiosity, even if I have a C++ program "whatever.cpp" in /src, there is no "whatever" file in the installation directory; where is that information going? Thanks! Selwyn-Lloyd McPherson _

[Rd] C++ in an R package

2006-08-02 Thread Selwyn-Lloyd McPherson
Hi all, I've read the manual on implementing C++ in R but I must be tripping over something simple. I am just trying to run a simple "Hello World" program from R and I understand how to call the function andhave no problem getting the package to install and, but should I expect .so files i

Re: [Rd] C Entry Points

2006-08-02 Thread Seth Falcon
Qsabound <[EMAIL PROTECTED]> writes: > Thanks for the help Thomas: > > Here's my output. I'll do some reading to determine what this implies.. > > nm myPackage.so | grep fifrt > 06e4 T fifrt That indicates that your fifrt function is in the shared library. I suspect the issue you are seeing

Re: [Rd] building windows packages under wine/linux and cross-compiling.

2006-08-02 Thread Sean Davis
Duncan Murdoch wrote: > On 8/2/2006 6:05 PM, Hin-Tak Leung wrote: > >>Uwe Ligges wrote: >> >> >>>I cannot imagine: Why should one want to perform difficult cross >>>compiling if you have Windows available? >>>And why should I run R under wine? If I like Windows, I use Windows, if >>>I have like

Re: [Rd] building windows packages under wine/linux and cross-compiling.

2006-08-02 Thread Duncan Murdoch
On 8/2/2006 6:05 PM, Hin-Tak Leung wrote: > Uwe Ligges wrote: > >> I cannot imagine: Why should one want to perform difficult cross >> compiling if you have Windows available? >> And why should I run R under wine? If I like Windows, I use Windows, if >> I have like Linux, there is no reason to r

Re: [Rd] building windows packages under wine/linux and cross-compiling.

2006-08-02 Thread Hin-Tak Leung
Uwe Ligges wrote: > > I cannot imagine: Why should one want to perform difficult cross > compiling if you have Windows available? > And why should I run R under wine? If I like Windows, I use Windows, if > I have like Linux, there is no reason to run R under wine. *You* cannot imagine. I am a

Re: [Rd] building windows packages under wine/linux and cross-compiling.

2006-08-02 Thread Uwe Ligges
Hin-Tak Leung wrote: > Prof Brian Ripley wrote: > >>This is make-specific. It is true for GNU make, but not for BSD-like >>makes (and you can also cross-compile from FreeBSD and Solaris x86). > > > I know it is very possibly GNU make specific - > but that section in R/src/gnuwin32/README.pack

Re: [Rd] C Entry Points

2006-08-02 Thread Simon Urbanek
On Aug 2, 2006, at 12:09 PM, Qsabound wrote: > > Thanks in advance for any suggestions: > > I found this question asked on the forum a few times, but never > found an > answer to the thread. > > I'm getting this error when I try to call my c routine from R: > > Error in .C("fifrt", as.double(x)

Re: [Rd] R-2.3.1 on AIX 5.3 installation.

2006-08-02 Thread Thomas Lumley
On Wed, 2 Aug 2006, kamil Marcinkowski wrote: > latest R-patched: also fails. > >> /usr/vac/bin/xlc_r -I../../src/extra/zlib -I../../src/extra/bzip2 - >> I../../src/extra/pcre -I. -I../../src/include -I../../src/include - >> I/usr/local/include -DHAVE_CONFIG_H -O -qstrict -c connections.c - >> o

[Rd] R-2.3.1 on AIX 5.3 installation.

2006-08-02 Thread kamil Marcinkowski
Hello all, I am trying to build R on AIX 5.3 on p595 using the native complier (xlc_r/xlf_r)? Has anyone installed R-2.3.1 on AIX 5.3 using the native complier (xlc_r)? If so would you reply with which flags and options did to use? I followed the suggested flags in the documentation. > setenv

Re: [Rd] building windows packages under wine/linux and cross-compiling.

2006-08-02 Thread Hin-Tak Leung
Prof Brian Ripley wrote: > This is make-specific. It is true for GNU make, but not for BSD-like > makes (and you can also cross-compile from FreeBSD and Solaris x86). I know it is very possibly GNU make specific - but that section in R/src/gnuwin32/README.package specifically says "Cross-buildin

Re: [Rd] C Entry Points

2006-08-02 Thread Qsabound
Thanks for the help Thomas: Here's my output. I'll do some reading to determine what this implies.. nm myPackage.so | grep fifrt 06e4 T fifrt Thanks again -- View this message in context: http://www.nabble.com/C-Entry-Points-tf2040772.html#a5618043 Sent from the R devel forum at Nabble.c

Re: [Rd] C Entry Points

2006-08-02 Thread Thomas Lumley
On Wed, 2 Aug 2006, Qsabound wrote: > > Thanks in advance for any suggestions: > > I found this question asked on the forum a few times, but never found an > answer to the thread. > > I'm getting this error when I try to call my c routine from R: > > Error in .C("fifrt", as.double(x), ans = double

Re: [Rd] allocating character string of given size for .C

2006-08-02 Thread Duncan Murdoch
On 8/2/2006 11:08 AM, Tamas K Papp wrote: > Hi, > > I have a C function (called via .C) which returns (by writing into > buffers) some values of known (or fixed) length, all of these are > numerical so I can allocate storage for them via as.double() and > as.integer(). > > However, there is a pot

[Rd] C Entry Points

2006-08-02 Thread Qsabound
Thanks in advance for any suggestions: I found this question asked on the forum a few times, but never found an answer to the thread. I'm getting this error when I try to call my c routine from R: Error in .C("fifrt", as.double(x), ans = double(1), PACKAGE = "myPackage") : C entry poi

Re: [Rd] building windows packages under wine/linux and cross-compiling.

2006-08-02 Thread Hin-Tak Leung
Hin-Tak Leung wrote: > Prof Brian Ripley wrote: >> On Mon, 31 Jul 2006, Hin-Tak Leung wrote: >> >>> Had some fun today, and thought it might be a good idea to share >>> and possibly for inclusion to R/src/gnuwin32/README.packages . >> >> >> Edit MkRules to set BUILD=CROSS and the appropriate pat

Re: [Rd] allocating character string of given size for .C

2006-08-02 Thread Prof Brian Ripley
On Wed, 2 Aug 2006, Tamas K Papp wrote: > Hi, > > I have a C function (called via .C) which returns (by writing into > buffers) some values of known (or fixed) length, all of these are > numerical so I can allocate storage for them via as.double() and > as.integer(). > > However, there is a pote

[Rd] allocating character string of given size for .C

2006-08-02 Thread Tamas K Papp
Hi, I have a C function (called via .C) which returns (by writing into buffers) some values of known (or fixed) length, all of these are numerical so I can allocate storage for them via as.double() and as.integer(). However, there is a potential error message that I would like to return into a ch

Re: [Rd] data() statement in functions

2006-08-02 Thread Prof Brian Ripley
On Wed, 2 Aug 2006, Robin Hankin wrote: > Hi > > I am writing a package in which a function needs a dataset (of > precomputed Stirling > numbers) to work. The .rda file resides in the data/ directory. > > Toy example follows: > > > f <- function(x){ >data(logS1) >. . . do stuff . .

[Rd] data() statement in functions

2006-08-02 Thread Robin Hankin
Hi I am writing a package in which a function needs a dataset (of precomputed Stirling numbers) to work. The .rda file resides in the data/ directory. Toy example follows: f <- function(x){ data(logS1) . . . do stuff . . . return(answer) } Is this a good way to do this? What is b

[Rd] AIX linking

2006-08-02 Thread Prof Brian Ripley
We had four years ago http://tolstoy.newcastle.edu.au/R/devel/02a/0440.html It looks as if the export files are not required if runtime linking is used, e.g. http://www.ethereal.com/lists/ethereal-dev/21/msg00027.html suggests -bexpall -bnoentry suffices. This suggests that we should be l