Re: [Rpy] na.action?

2009-09-30 Thread Nathaniel Smith
On Wed, Sep 30, 2009 at 8:41 AM, Peter wrote: > Can you do something like check if example_name is a valid argument > for the function at run time, and if not, check example.name instead? > Would this impose too high a performance cost? Unfortunately, there is no reliable way to work out what arg

Re: [Rpy] na.action?

2009-09-30 Thread Nathaniel Smith
On Wed, Sep 30, 2009 at 8:08 AM, Laurent Gautier wrote: > Nathaniel Smith wrote: >> IMHO, if you're wondering about the case where *both* are valid, then >> you've already lost. If you're wondering that, then it means you're >> trying to handle the case where function A takes foo.bar, and function

Re: [Rpy] na.action?

2009-09-30 Thread Peter
On Wed, Sep 30, 2009 at 4:59 PM, Laurent Gautier wrote: > > Peter wrote: >> >> Can you do something like check if example_name is a valid argument >> for the function at run time, and if not, check example.name instead? >> Would this impose too high a performance cost? >> >> I agree this won't cov

Re: [Rpy] na.action?

2009-09-30 Thread Laurent Gautier
Peter wrote: > On Wed, Sep 30, 2009 at 4:08 PM, Laurent Gautier wrote: >>> For my own use, I looked around, and couldn't find any functions that >>> had _ arguments, and lots that had . arguments. >> Older R code did not have _ (because it used to be an invalid character >> for regular symbol, as

Re: [Rpy] na.action?

2009-09-30 Thread Peter
On Wed, Sep 30, 2009 at 4:08 PM, Laurent Gautier wrote: > >> For my own use, I looked around, and couldn't find any functions that >> had _ arguments, and lots that had . arguments. > > Older R code did not have _ (because it used to be an invalid character > for regular symbol, as _ was an alias

Re: [Rpy] na.action?

2009-09-30 Thread Laurent Gautier
Nathaniel Smith wrote: > On Wed, Sep 30, 2009 at 1:15 AM, Laurent Gautier wrote: >> Rewriting function signatures in order to replace '.' with '_' is something >> that is ichting me, but which I would like to happen a safe way. For >> example, what if a function signature has both 'foo.bar' and 'f

Re: [Rpy] na.action?

2009-09-30 Thread Peter
On Wed, Sep 30, 2009 at 10:05 AM, Nathaniel Smith wrote: > > On Wed, Sep 30, 2009 at 1:15 AM, Laurent Gautier wrote: >> >> Rewriting function signatures in order to replace '.' with '_' is something >> that is ichting me, but which I would like to happen a safe way. For >> example, what if a func

Re: [Rpy] na.action?

2009-09-30 Thread Nathaniel Smith
On Wed, Sep 30, 2009 at 1:15 AM, Laurent Gautier wrote: > > Rewriting function signatures in order to replace '.' with '_' is something > that is ichting me, but which I would like to happen a safe way. For > example, what if a function signature has both 'foo.bar' and 'foo_bar' in > its list of p

Re: [Rpy] na.action?

2009-09-30 Thread Laurent Gautier
Rewriting function signatures in order to replace '.' with '_' is something that is ichting me, but which I would like to happen a safe way. For example, what if a function signature has both 'foo.bar' and 'foo_bar' in its list of parameters ? I have already started with having semi-static (th

Re: [Rpy] na.action?

2009-09-30 Thread Laurent Gautier
The first call is an issue with you Python code. '.' is a special character in Python. http://rpy.sourceforge.net/rpy2/doc/html/robjects.html#functions (same in 2.10-dev, with extra gizmos http://rpy.sourceforge.net/rpy2/doc-dev/html/robjects.html#functions L. Gary Strangman wrote: > Hi agai

Re: [Rpy] Making dataframes ... fast

2009-09-30 Thread Laurent Gautier
Gary, The "wrong" order (transposed) is for the creation of a data.frame, which is distinct from reading the information needed to create a data.frame from a file in which each row is a represented by a line. In R, the functions read.table, read.csv, read.delim, etc... are doing the transposit