Re: [Rd] Circumventing code/documentation mismatches ('R CMD check')

2011-07-05 Thread peter dalgaard
On Jul 5, 2011, at 08:00 , Johannes Graumann wrote: Hello, As prompted by B. Ripley (see below), I am transfering this over from R-User ... For a package I am writing a function that looks like test - function(Argument1=NA){ # Prerequisite testing

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread Matthew Dowle
Simon, Thanks for the great suggestion. I've written a skeleton assignment function for data.table which incurs no copies, which works for this case. For completeness, if I understand correctly, this is for : i) convenience of new users who don't know how to vectorize yet ii) more complex

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Tobias Verbeke
L.S. On 07/05/2011 02:16 AM, mark.braving...@csiro.au wrote: I may have misunderstood, but: Please could we have an optional installation that does not*not* byte-compile base and recommended? Reason: it's not possible to debug byte-compiled code-- at least not with the 'debug' package,

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Duncan Murdoch
On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM, mark.braving...@csiro.au wrote: I may have misunderstood, but: Please could we have an optional installation that does not*not* byte-compile base and recommended? Reason: it's not possible to debug byte-compiled

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Tobias Verbeke
Dear Duncan, On 07/05/2011 03:25 PM, Duncan Murdoch wrote: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM, mark.braving...@csiro.au wrote: I may have misunderstood, but: Please could we have an optional installation that does not*not* byte-compile base and

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Duncan Murdoch
On 05/07/2011 10:17 AM, Tobias Verbeke wrote: Dear Duncan, On 07/05/2011 03:25 PM, Duncan Murdoch wrote: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM, mark.braving...@csiro.au wrote: I may have misunderstood, but: Please could we have an optional

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Duncan Murdoch
On 05/07/2011 11:20 AM, Stephan Wahlbrink wrote: Dear developers, Duncan Murdoch wrote [2011-07-05 15:25]: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM, mark.braving...@csiro.au wrote: I may have misunderstood, but: Please could we have an optional

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Stephan Wahlbrink
Dear developers, Duncan Murdoch wrote [2011-07-05 15:25]: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM, mark.braving...@csiro.au wrote: I may have misunderstood, but: Please could we have an optional installation that does not*not* byte-compile base and

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Tobias Verbeke
On 07/05/2011 04:21 PM, Duncan Murdoch wrote: On 05/07/2011 10:17 AM, Tobias Verbeke wrote: Dear Duncan, On 07/05/2011 03:25 PM, Duncan Murdoch wrote: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM, mark.braving...@csiro.au wrote: I may have misunderstood, but:

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread Matthew Dowle
Simon (and all), I've tried to make assignment as fast as calling `[-.data.table` directly, for user convenience. Profiling shows (IIUC) that it isn't dispatch, but x being copied. Is there a way to prevent '[-' from copying x? Small reproducible example in vanilla R 2.13.0 : x =

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Simon Urbanek
On Jul 5, 2011, at 1:45 PM, Tobias Verbeke wrote: On 07/05/2011 04:21 PM, Duncan Murdoch wrote: On 05/07/2011 10:17 AM, Tobias Verbeke wrote: Dear Duncan, On 07/05/2011 03:25 PM, Duncan Murdoch wrote: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM,

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-05 Thread Duncan Murdoch
On 05/07/2011 1:45 PM, Tobias Verbeke wrote: On 07/05/2011 04:21 PM, Duncan Murdoch wrote: On 05/07/2011 10:17 AM, Tobias Verbeke wrote: Dear Duncan, On 07/05/2011 03:25 PM, Duncan Murdoch wrote: On 05/07/2011 6:52 AM, Tobias Verbeke wrote: L.S. On 07/05/2011 02:16 AM,

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread Simon Urbanek
On Jul 5, 2011, at 2:08 PM, Matthew Dowle wrote: Simon (and all), I've tried to make assignment as fast as calling `[-.data.table` directly, for user convenience. Profiling shows (IIUC) that it isn't dispatch, but x being copied. Is there a way to prevent '[-' from copying x? Good point,

Re: [Rd] Syntactically valid names

2011-07-05 Thread Hadley Wickham
I wouldn't expect so. The basic structure might be handled using a regexp of sorts, but even that is tricky because of the dot not followed by number rule, and then there's the stop list of reserved words, which would make your code clumsy whatever you do. How on Earth would you expect

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread luke-tierney
On Tue, 5 Jul 2011, Matthew Dowle wrote: Simon (and all), I've tried to make assignment as fast as calling `[-.data.table` directly, for user convenience. Profiling shows (IIUC) that it isn't dispatch, but x being copied. Is there a way to prevent '[-' from copying x? Small reproducible

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread luke-tierney
On Tue, 5 Jul 2011, Simon Urbanek wrote: On Jul 5, 2011, at 2:08 PM, Matthew Dowle wrote: Simon (and all), I've tried to make assignment as fast as calling `[-.data.table` directly, for user convenience. Profiling shows (IIUC) that it isn't dispatch, but x being copied. Is there a way to

Re: [Rd] Syntactically valid names

2011-07-05 Thread Hadley Wickham
On Tue, Jul 5, 2011 at 7:31 PM, steven mosher mosherste...@gmail.com wrote:  regexp approach is kinda ugly http://www.r-bloggers.com/testing-for-valid-variable-names/ Hmm, I think that suggests a couple of small bug in make.names: make.names(...) [1] ... make.names(..1) [1] ..1 and x -

Re: [Rd] Syntactically valid names

2011-07-05 Thread steven mosher
regexp approach is kinda ugly http://www.r-bloggers.com/testing-for-valid-variable-names/ On Tue, Jul 5, 2011 at 3:29 PM, Hadley Wickham had...@rice.edu wrote: I wouldn't expect so. The basic structure might be handled using a regexp of sorts, but even that is tricky because of the dot not

Re: [Rd] Syntactically valid names

2011-07-05 Thread Davor Cubranic
On June 30, 2011 01:37:57 PM Hadley Wickham wrote: Is there any easy way to tell if a string is a syntactically valid name? [...] One implementation would be: is.syntactic - function(x) x == make.names(x) but I wonder if there's a more elegant way. This is without quoting, right?

Re: [Rd] Syntactically valid names

2011-07-05 Thread Hadley Wickham
This is without quoting, right? Because make.names replaces spaces with periods, and using quoting I can create syntactically valid names that do include spaces:    `x prime` - 3    ls() That's not a syntactically valid name - you use backticks to refer to names that are not syntactically

Re: [Rd] Syntactically valid names

2011-07-05 Thread peter dalgaard
On Jul 6, 2011, at 01:40 , Hadley Wickham wrote: On Tue, Jul 5, 2011 at 7:31 PM, steven mosher mosherste...@gmail.com wrote: regexp approach is kinda ugly http://www.r-bloggers.com/testing-for-valid-variable-names/ Hmm, I think that suggests a couple of small bug in make.names:

Re: [Rd] Syntactically valid names

2011-07-05 Thread Davor Cubranic
On July 5, 2011 04:59:16 PM Hadley Wickham wrote: That's not a syntactically valid name - you use backticks to refer to names that are not syntactically valid. I was too loose in my terminology: I meant that `x prime` is a valid name, but as you said, it is not syntactically valid. Davor

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread David Winsemius
On Jul 5, 2011, at 7:18 PM, luke-tier...@uiowa.edu luke-tier...@uiowa.edu wrote: On Tue, 5 Jul 2011, Simon Urbanek wrote: On Jul 5, 2011, at 2:08 PM, Matthew Dowle wrote: Simon (and all), I've tried to make assignment as fast as calling `[-.data.table` directly, for user convenience.

Re: [Rd] [datatable-help] speeding up perception

2011-07-05 Thread Simon Urbanek
No subassignment function satisfies that condition, because you can always call them directly. However, that doesn't stop the default method from making that assumption, so I'm not sure it's an issue. David, Just to clarify - the data frame content is not copied, we are talking about the

Re: [Rd] Syntactically valid names

2011-07-05 Thread Hadley Wickham
What's wrong with that? They are names alright, just with special meanings. But you can't really use them for variables: ... - 4 ... Error: '...' used in an incorrect context ..1 - 4 ..1 Error: 'nthcdr' needs a list to CDR down And make.names generally protects you against that: