Skip to content

problem with arrange() #331

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

Closed
pachevalier opened this issue Mar 18, 2014 · 6 comments
Closed

problem with arrange() #331

pachevalier opened this issue Mar 18, 2014 · 6 comments
Assignees
Labels
bug an unexpected problem or unintended behavior
Milestone

Comments

@pachevalier
Copy link
Contributor

Sometimes arrange() returns a weird output. In this gist file, I've tried to order a dataset according to the x variable. I don't understand why 1.53261062618519 is assumed to be greater than missing values or other values such as 2.18733299301658.

The result of

arrange(tdf, desc(x))

isn't the same of the result as

tdf[order(tdf$x, decreasing = TRUE),]
@hadley hadley added the bug label Mar 18, 2014
@hadley hadley added this to the v0.2 milestone Mar 18, 2014
@hadley
Copy link
Member

hadley commented Mar 18, 2014

Slightly simpler example:

library("dplyr")
N <- 20
df <- data.frame(id = 1:N, x = rnorm(N))
df$x[runif(N) < .1]  <- NA

tdf  <- tbl_df(df)
arrange(tdf, desc(x))

@pachevalier
Copy link
Contributor Author

When I run :

library("dplyr")
N <- 20
set.seed(1234)
df <- data.frame(id =1:N, x = rnorm(N))
df$x[runif(N) < .1]  <- NA
tdf  <- tbl_df(df)
arrange(tdf, desc(x))

I've got a fatal error (R session aborted).

@romainfrancois
Copy link
Member

@blaquans I can't reproduce the error, do you still get it with the current dev version ?

@pachevalier
Copy link
Contributor Author

I've got the following error when I try to install the dev version :

Error: processing vignette 'databases.Rmd' failed with diagnostics:
RSQLite package required to connect to sqlite db
Execution halted
Erreur : Command failed (1)

@hadley
Copy link
Member

hadley commented Mar 20, 2014

@blaquans try install_github("hadley/devtools", build_vignettes = F)

@pachevalier
Copy link
Contributor Author

@hadley, @romainfrancois

Ok it works !

Thanks

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants