Re: [Rd] Telling Windows how to find DLL's from R?

2010-07-09 Thread Dominick Samperi
Thanks Duncan, Martin: Please ignore my remarks about "top-level Windows context". I made a mistake. After correcting my mistake Duncan's suggestion worked, and the solution is very similar to what the DLLpath argument of dyn.load() does: Sys.setenv() can be used to edit PATH so that Windows finds

Re: [Rd] Telling Windows how to find DLL's from R?

2010-07-09 Thread Dominick Samperi
On Fri, Jul 9, 2010 at 3:48 PM, Duncan Murdoch wrote: > On 09/07/2010 2:38 PM, Dominick Samperi wrote: > >> Is it possible to set Windows' search path from within R, or >> to tell Windows how to find a DLL in some other way from >> R? Specifically, if a package DLL depends on another DLL >> the no

Re: [Rd] Telling Windows how to find DLL's from R?

2010-07-09 Thread Martin Morgan
On 07/09/2010 11:38 AM, Dominick Samperi wrote: > Is it possible to set Windows' search path from within R, or > to tell Windows how to find a DLL in some other way from > R? Specifically, if a package DLL depends on another DLL > the normal requirement is that the second DLL be in the > search pat

Re: [Rd] Telling Windows how to find DLL's from R?

2010-07-09 Thread Duncan Murdoch
On 09/07/2010 2:38 PM, Dominick Samperi wrote: Is it possible to set Windows' search path from within R, or to tell Windows how to find a DLL in some other way from R? Specifically, if a package DLL depends on another DLL the normal requirement is that the second DLL be in the search path so Wind

[Rd] Telling Windows how to find DLL's from R?

2010-07-09 Thread Dominick Samperi
Is it possible to set Windows' search path from within R, or to tell Windows how to find a DLL in some other way from R? Specifically, if a package DLL depends on another DLL the normal requirement is that the second DLL be in the search path so Windows can find it (there are other tricks, but they

Re: [Rd] Strange R object

2010-07-09 Thread Simon Urbanek
On Jul 9, 2010, at 12:41 PM, Deepayan Sarkar wrote: > On Fri, Jul 9, 2010 at 5:25 AM, Peter Dalgaard wrote: >> Gabor Grothendieck wrote: >>> On Fri, Jul 9, 2010 at 5:09 AM, Peter Dalgaard wrote: Gabor Grothendieck wrote: > I have *** attached *** an RData file containing an R object th

Re: [Rd] Strange R object

2010-07-09 Thread Deepayan Sarkar
On Fri, Jul 9, 2010 at 5:25 AM, Peter Dalgaard wrote: > Gabor Grothendieck wrote: >> On Fri, Jul 9, 2010 at 5:09 AM, Peter Dalgaard wrote: >>> Gabor Grothendieck wrote: I have *** attached *** an RData file containing an R object that is acting strangely. Try this in a fresh w

Re: [Rd] Mysterious behavior

2010-07-09 Thread Duncan Murdoch
On 09/07/2010 10:55 AM, Therneau, Terry M., Ph.D. wrote: I had trouble with some tests for the survival suite last night that I cannot explain. Framework: Ubuntu Linux, R2.11. For testing survival I have a separate directory and Makefile. I pull everything into the local .RData, no packa

[Rd] Mysterious behavior

2010-07-09 Thread Therneau, Terry M., Ph.D.
I had trouble with some tests for the survival suite last night that I cannot explain. Framework: Ubuntu Linux, R2.11. For testing survival I have a separate directory and Makefile. I pull everything into the local .RData, no packages, library, or namespace. (It's easier to add test modifi

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Marc Schwartz
I am certainly not an expert in S4 and know enough to be dangerous. That being said, I used setMethod() as Romain had done. I would defer to others with greater experience as to the pros and cons, including the risk of confusion, but here is one approach, extending the example in ?slot: setClas

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Renaud Gaujoux
I do not want to access the slot itself but its content: a:toto would be a...@slot1[['toto']]. The thing is that I would like to have two different methods: '$' (that I already have) and another one to define, ideally that behaves like '$'. So in brief: - a:toto would be for a...@slot1[['toto']]

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Marc Schwartz
You were, in effect, trying to overload the ":" operator, which is of course for defining sequences. If you are using S4 methods, what is wrong with using the default "@" as the extraction syntax (eg. a...@name) to get at slots? See ?"@" and ?slot HTH, Marc Schwartz On Jul 9, 2010, at 7:49 A

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Renaud Gaujoux
Alright. Maybe the symbol I chose was not appropriate. I tried ':' to be able to do 'a:name' with 'a' a S4 object. I get the following error: Error in genericForPrimitive(f) : methods may not be defined for primitive function ":" in this version of R Does there exist any symbol that would b

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Duncan Murdoch
On 09/07/2010 8:18 AM, Renaud Gaujoux wrote: Hi, is there a way to define a method say '$$' that would behave like '$' and allow calls like 'a$$name'? No, the parser handles a fixed syntax, and that expression is not legal. You could do it with a %$$% name using the infix operator syntax.

Re: [Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Romain Francois
Le 09/07/10 14:18, Renaud Gaujoux a écrit : Hi, is there a way to define a method say '$$' that would behave like '$' and allow calls like 'a$$name'? Thanks. Renaud No. This is not grammatically valid syntax: > parse( text = 'a$$name' ) Erreur dans parse(text = "a$$name") : '$' inattendu(e

Re: [Rd] Strange R object

2010-07-09 Thread Peter Dalgaard
Gabor Grothendieck wrote: > On Fri, Jul 9, 2010 at 5:09 AM, Peter Dalgaard wrote: >> Gabor Grothendieck wrote: >>> I have *** attached *** an RData file containing an R object that >>> is acting strangely. >>> >>> Try this in a fresh workspace. Do not load zoo or any other package. >>> We load the

[Rd] Defining a method that behaves like '$'?

2010-07-09 Thread Renaud Gaujoux
Hi, is there a way to define a method say '$$' that would behave like '$' and allow calls like 'a$$name'? Thanks. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa ### UNIVERSITY OF CAPE TOWN This e-mail is subject to the UCT ICT policies and e-mail

Re: [Rd] Strange R object

2010-07-09 Thread Gabor Grothendieck
On Fri, Jul 9, 2010 at 5:09 AM, Peter Dalgaard wrote: > Gabor Grothendieck wrote: >> I have *** attached *** an RData file containing an R object that >> is acting strangely. >> >> Try this in a fresh workspace. Do not load zoo or any other package. >> We load the object, zz2, from the attached RD

Re: [Rd] Strange R object

2010-07-09 Thread Peter Dalgaard
Gabor Grothendieck wrote: > I have *** attached *** an RData file containing an R object that > is acting strangely. > > Try this in a fresh workspace. Do not load zoo or any other package. > We load the object, zz2, from the attached RData file. It is just > the number 1 with the class c("zooreg

[Rd] Suggestion for serialization performance improvement on Windows

2010-07-09 Thread Bryan W. Lewis
Dear R developers, The slow performance of serializing to a raw vector on Windows is an issue that has appeared in this list before. It appears to be due to the frequent use of realloc from the resize_buffer method in serialize.c. I suggest a more granular, but still incremental, re-allocation