Hadley's note on partial matching has me scared the most concerning the
as.null() coding. So the need for a hasName() (or whatever) function seems all
the more compelling, and that it be in base R. Perhaps it should be generic,
with a default method that searches in the names attribute, potentia
http://www.keittlab.org/
On Mon, Jun 27, 2016 at 4:46 PM, Tim Keitt wrote:
>
>
> http://www.keittlab.org/
>
> On Mon, Jun 27, 2016 at 10:19 AM, Duncan Murdoch > wrote:
>
>> On 27/06/2016 11:08 AM, Tim Keitt wrote:
>>
>>> http://www.keittlab.org/
>>>
>>> On Mon, Jun 27, 2016 at 3:22 AM, Joris Me
On 27/06/2016 5:46 PM, Tim Keitt wrote:
http://www.keittlab.org/
On Mon, Jun 27, 2016 at 10:19 AM, Duncan Murdoch
mailto:murdoch.dun...@gmail.com>> wrote:
On 27/06/2016 11:08 AM, Tim Keitt wrote:
http://www.keittlab.org/
On Mon, Jun 27, 2016 at 3:22 AM, Joris Meys mailto
http://www.keittlab.org/
On Mon, Jun 27, 2016 at 10:19 AM, Duncan Murdoch
wrote:
> On 27/06/2016 11:08 AM, Tim Keitt wrote:
>
>> http://www.keittlab.org/
>>
>> On Mon, Jun 27, 2016 at 3:22 AM, Joris Meys wrote:
>>
>> > If you want to call a non exported function, you need three colons
>> >
>> >
On 27/06/2016 1:09 PM, Hadley Wickham wrote:
The other thing you need to be aware of it you're using the other
approach is partial matching:
df <- data.frame(xyz = 1)
is.null(df$x)
#> [1] FALSE
Duncan - I think that argues for including a has_name() (hasName() ?)
function in base R. Is that som
The other thing you need to be aware of it you're using the other
approach is partial matching:
df <- data.frame(xyz = 1)
is.null(df$x)
#> [1] FALSE
Duncan - I think that argues for including a has_name() (hasName() ?)
function in base R. Is that something you'd consider?
Hadley
On Mon, Jun 27,
On 27/06/2016 10:46 AM, Hadley Wickham wrote:
On Mon, Jun 27, 2016 at 9:03 AM, Duncan Murdoch
wrote:
> On 27/06/2016 9:22 AM, Lenth, Russell V wrote:
>>
>> My package 'lsmeans' is now suddenly broken because of a new provision in
>> the 'tibble' package (loaded by 'dplyr' 0.5.0), whereby the "[[
Dear Russell.
The assertthat package (by Hadley) provides a has_name() function.
> library(assertthat)
> x <- data.frame(y = NA)
> has_name(x, "y")
[1] TRUE
> has_name(x, "x")
[1] FALSE
Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
On 27/06/2016 11:08 AM, Tim Keitt wrote:
http://www.keittlab.org/
On Mon, Jun 27, 2016 at 3:22 AM, Joris Meys wrote:
> If you want to call a non exported function, you need three colons
>
> X:::f ()
>
> And frankly, that is a bad idea.
>
I think you missed the point (and stated the obvious).
http://www.keittlab.org/
On Mon, Jun 27, 2016 at 3:22 AM, Joris Meys wrote:
> If you want to call a non exported function, you need three colons
>
> X:::f ()
>
> And frankly, that is a bad idea.
>
I think you missed the point (and stated the obvious).
A well-designed namespace feature would giv
Thanks, Hadley. I do understand why you'd want more careful checking.
If you're going to provide a variable-existing function, may I suggest a short
name like 'has'? I.e., has(x, var) returns TRUE if x has var in it.
Thanks
Russ
> On Jun 27, 2016, at 9:47 AM, Hadley Wickham wrote:
>
> On M
On Mon, Jun 27, 2016 at 9:03 AM, Duncan Murdoch
wrote:
> On 27/06/2016 9:22 AM, Lenth, Russell V wrote:
>>
>> My package 'lsmeans' is now suddenly broken because of a new provision in
>> the 'tibble' package (loaded by 'dplyr' 0.5.0), whereby the "[[" and "$"
>> methods for 'tbl_df' objects - as d
Am Montag, 27. Juni 2016, 10:03:35 schrieb Duncan Murdoch:
> On 27/06/2016 9:22 AM, Lenth, Russell V wrote:
> > My package 'lsmeans' is now suddenly broken because of a new provision in
> > the 'tibble' package (loaded by 'dplyr' 0.5.0), whereby the "[[" and "$"
> > methods for 'tbl_df' objects - a
On 27/06/2016 9:22 AM, Lenth, Russell V wrote:
My package 'lsmeans' is now suddenly broken because of a new provision in the 'tibble' package
(loaded by 'dplyr' 0.5.0), whereby the "[[" and "$" methods for 'tbl_df'
objects - as documented - throw an error if a variable is not found.
The proble
My package 'lsmeans' is now suddenly broken because of a new provision in the
'tibble' package (loaded by 'dplyr' 0.5.0), whereby the "[[" and "$" methods
for 'tbl_df' objects - as documented - throw an error if a variable is not
found.
The problem is that my code uses tests like this:
15 matches
Mail list logo