Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dplyr crash with arrange on R 3.3.0 #1870

Closed
RobertMyles opened this issue May 31, 2016 · 8 comments
Closed

dplyr crash with arrange on R 3.3.0 #1870

RobertMyles opened this issue May 31, 2016 · 8 comments
Labels
Milestone

Comments

@RobertMyles
Copy link

@RobertMyles RobertMyles commented May 31, 2016

Any idea why this might be happening?

I'll use a reprex from Hadley's R for Data Science book, Exercise 4.4.1, 1: put NA at the top of the flights dataframe with arrange().

library(dplyr)
library(nycflights13)

Any of these causes a crash:

arrange(flights, is.na(flights))
arrange(flights, desc=is.na(flights))

But not this:

arrange(flights, is.na(arr_delay))
@hadley
Copy link
Member

@hadley hadley commented May 31, 2016

(For future reference please don't include sessionInfo() unless it's requested)

@hadley
Copy link
Member

@hadley hadley commented Jun 7, 2016

Reprex that illustrates the basic problem:

dplyr::arrange(mtcars, is.na(mtcars))

@krlmlr do you have time in the next week or so to dig into this? I assume we're missing a check for matrices somewhere

@hadley hadley added this to the 0.5 milestone Jun 7, 2016
@krlmlr
Copy link
Member

@krlmlr krlmlr commented Jun 8, 2016

What is this operation supposed to do? is.na(mtcars) is an all-FALSE logical matrix...

@hadley
Copy link
Member

@hadley hadley commented Jun 8, 2016

@krlmlr sorry - it should throw an error. This is just another check on the input type

@krlmlr
Copy link
Member

@krlmlr krlmlr commented Jun 8, 2016

Could #1878 help?

@krlmlr
Copy link
Member

@krlmlr krlmlr commented Jun 10, 2016

No, same behavior with #1878.

@mjpdenver
Copy link

@mjpdenver mjpdenver commented Mar 24, 2017

(I don't know if it is appropriate to add a comment to a closed topic or start a new one, but I am having similar problems with summarise crashing R. I am running R version 3.3.3 and Rstudio version 1.0.136. )

I just started using updated versions of R and Rstudio yesterday and have been getting frequent crashes with summarise. The following examples cited earlier here causes a crash.

tst <- data.frame(
grp = c(rep("A", 16), rep("B", 16), rep("C", 16)),
x = rnorm(163),
y = rnorm(16
3)
)
tst %>%
mutate(corr = cor(x, y, na.rm = TRUE))

As well as

dplyr::arrange(mtcars, is.na(mtcars))

@hadley
Copy link
Member

@hadley hadley commented Mar 24, 2017

If you have any doubt, file a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants