r - How to use order_by with first()? -


when run simple version of first(...) order_by, r crashes. example following

library(dplyr) summarize(group_by(mtcars, cyl), bigmpg = last(mpg, order_by = wt)) 

crashes r.

is bug (perhaps related dplyr issue #626) or else wrong?

i'm running r version 3.3.1 (x86_64-w64-mingw32/x64) , dplyr version 0.5.0 on windows 10.

try qualifying dplyr functions.

library(magrittr) requirenamespace("dplyr")  dplyr::data_frame(id = 1:9, value = 42) %>%   dplyr::summarise(     dplyr::first(value, order_by = id)   ) 

this work-around avoids crash me. example crashed on red hat 6.7, ubuntu 14.04, windows 7, & windows 8 machines (r 3.3.1; dplyr 0.5.0).


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

php - What are the best practices for creatiang a "settings" model in Laravel 5? -