Re: [Rd] beginner's guide to C++ programming with R packages?

2009-06-29 Thread Mathieu Ribatet
An other possibility is to insert new features in your package once you feel pretty confident with your new code. "R CMD SHLIB myfile.c" will build the SHared LIBrary and then load it in R by invoking "dyn.load("myfile.so")" in an R console. Once you're satisfied with your code, just do as you did

Re: [Rd] Installing DLL elsewhere than in \libs?

2009-06-29 Thread Dirk Eddelbuettel
Philippe, On 29 June 2009 at 19:59, Philippe Grosjean wrote: | Its a couple of days I am fighting with this problem, and cannot find a | solution. I need to compile a DLL that is not directly used by R, but | must be installed elsewhere (it is indeed part of a Tcl/Tk package). So, | I want to

Re: [Rd] S4 and connection slot [Sec=Unclassified]

2009-06-29 Thread Troy Robertson
Thanks guys, I wasn't having a problem storing active connections in slots initially. They were opened during initialisation of the object and then a routine ran through and closed them all before the program exited. I have now implemented them as environment stored objects as a way around the

Re: [Rd] should Sys.glob() cope with a UNC windows path beginning with backslashes?

2009-06-29 Thread Tony Plate
Prof Brian Ripley wrote: On Fri, 26 Jun 2009, Tony Plate wrote: I find that Sys.glob() doesn't like UNC paths where the initial slashes are backslashes. The help page for Sys.glob() doesn't specificly mention UNC paths, but does say: "File paths in Windows are interpreted with separator \ or

[Rd] active bindings and ls.str

2009-06-29 Thread Romain Francois
Hello, Should active binding appear as such in ls.str. > makeActiveBinding( "xx", function(arg){ Sys.sleep(10) }, .GlobalEnv ) > ls.str() # takes 10 seconds xx : NULL What we see here is the result of the "setter" of the binding. I'm attaching a patch that prints this instead: > ls.str() xx

Re: [Rd] S4 and connection slot [Sec=Unclassified]

2009-06-29 Thread Martin Morgan
Stavros Macrakis wrote: > On Mon, Jun 29, 2009 at 9:19 AM, Martin Morgan > wrote: > > ...I'm not sure that including a connection in a slot is going to be > a good > idea, though -- a connection has reference-like semantics, so you can > end up with mult

[Rd] Installing DLL elsewhere than in \libs?

2009-06-29 Thread Philippe Grosjean
Hello, Its a couple of days I am fighting with this problem, and cannot find a solution. I need to compile a DLL that is not directly used by R, but must be installed elsewhere (it is indeed part of a Tcl/Tk package). So, I want to install it in /tklibs/tkpackage/alib.dll (under Windows) in my

Re: [Rd] S4 and connection slot [Sec=Unclassified]

2009-06-29 Thread Paul Gilbert
There may be a problem that objects with slots can persist into new sessions (i.e. be saved) but I think connections die when a session ends, so whatever is in the slot is no longer valid. Paul Stavros Macrakis wrote: On Mon, Jun 29, 2009 at 9:19 AM, Martin Morgan wrote: ...I'm not sure

Re: [Rd] S4 and connection slot [Sec=Unclassified]

2009-06-29 Thread Stavros Macrakis
On Mon, Jun 29, 2009 at 9:19 AM, Martin Morgan wrote: > ...I'm not sure that including a connection in a slot is going to be a good > idea, though -- a connection has reference-like semantics, so you can > end up with multiple objects pointing to the same connection, Also when > an object is garb

Re: [Rd] S4 and connection slot [Sec=Unclassified]

2009-06-29 Thread Martin Morgan
Troy Robertson wrote: > Right you are Martin, > > When you simplify things right down your code below works. > > I had kept getting the error below: > > Error in validObject(.Object) : > invalid class "KrillEnvironment" object: class for slot "datafileConn" > ("file") > > But now realise tha

[Rd] pbeta (PR#13786)

2009-06-29 Thread pokar
Full_Name: Piotr Pokarowski Version: 2.9.0 OS: linux or windows Submission from: (NULL) (212.76.37.160) Dear R Development Core Team, I would like to submit a bug in pbeta and, consequently, in pf. The function -pbeta(x,.5,2047,lower.tail=F,log.p=T) increases roughly linearly in [.27, .292], ne

Re: [Rd] beginner's guide to C++ programming with R packages?

2009-06-29 Thread Douglas Bates
On Fri, Jun 26, 2009 at 2:43 PM, Paul Johnson wrote: > Hello, again. > > I'm interested to learn how programmers develop & test C/C++ code with > R packages in Linux.  I've been reading R source and the manual on > Writing R Extensions but there are just a couple of details I can't > understand.  I

[Rd] Removing support for --without-iconv

2009-06-29 Thread Prof Brian Ripley
We made support for a sufficiently general iconv 'essential' in R 2.5.0 and have been giving configure warnings on --without-iconv ever since. We originally announced that --without-iconv would be available in 2.5.x only. The delay in making iconv compulsory was down to problems with install