[R] dplyr and function length() and some apologies

Karl Schilling karl.schilling at uni-bonn.de
Tue Aug 4 14:55:55 CEST 2015


Dear Hadley:

your request for evidence for my observation seems to have paved the way 
to solve this issue. As it turns out, the effect I described only occurs 
with "data.frames" read in with readxl. Clearly, I missed that these are 
tbl_df. And that explains the differential behavior depending on whether 
dplyr is loaded or not. Also, I realize that this latter effect can be 
avoided by explicitly converting objects read in with readxl to a 
data.frame.

Well, I should have known that if i had carefully read the README stuff 
for readxl. But then, readxl is so much of an every-day tool for me that 
I didn't even think of its involvement in my problem, all the more as 
the reference manual does not mention the format/class of objects read 
in with readxl.

So my apologies for any confusion I may have caused - and I certainly 
did not mean my observation as a charge against dplyr or its authors. 
Quite to the contrary, i appreciate thees tools, and as you may see, 
tray to understand and use them.

Thank you so much again

Karl

On 04.08.2015 13:14, Hadley Wickham wrote:
>> No, the effect I described has nothing to do wit USING dplyr. It occurs with
>> >any (preexisting) data.frame once dplyr is LOADED (require(dplyr). It is
>> >this silent, sort of "backward acting" effect that disturbs me.
> You're going to need to provide some evidence for that charge: dplyr
> does not affect the behaviour of data.frames (only tbl_dfs)
>
> Hadley

-- 
Karl Schilling



More information about the R-help mailing list