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

problem with arrange() #331

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
Milestone

Comments

@pachevalier
Copy link
Contributor

@pachevalier pachevalier commented Mar 18, 2014

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 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))

Loading

@pachevalier
Copy link
Contributor Author

@pachevalier pachevalier commented Mar 18, 2014

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).

Loading

@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Mar 20, 2014

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

Loading

@pachevalier
Copy link
Contributor Author

@pachevalier pachevalier commented Mar 20, 2014

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)

Loading

@hadley
Copy link
Member

@hadley hadley commented Mar 20, 2014

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

Loading

@pachevalier
Copy link
Contributor Author

@pachevalier pachevalier commented Mar 20, 2014

@hadley, @romainfrancois

Ok it works !

Thanks

Loading

@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants