> 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:
> m
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 vector
On Jul 5, 2011, at 7:18 PM, > 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. Profiling shows (IIUC) that it isn't
dispatch
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
__
On Jul 6, 2011, at 01:40 , Hadley Wickham wrote:
> On Tue, Jul 5, 2011 at 7:31 PM, steven mosher 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("...")
>
> 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 syntact
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
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 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 followed by
On Tue, Jul 5, 2011 at 7:31 PM, steven mosher 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 <- paste(rep("
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 pr
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 exam
> 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 ex
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
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/0
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.
>>> >>
>>> >> O
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 = list(a=1:10
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 misundersto
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 recomm
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 ha
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
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 recom
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-comp
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, whic
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 ex
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
> if(!(is.na(A
25 matches
Mail list logo