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

group_by with a data or timestamp grouping variable causes R to crash #233

Closed
giacecco opened this issue Feb 2, 2014 · 4 comments
Closed
Milestone

Comments

@giacecco
Copy link

giacecco commented Feb 2, 2014

I am using dplyr 0.1.1 on R 3.0.2 on MacOS Mavericks.

What you see below crashes on the 'group_by' command, either that I converted the SCHEDULED_OFF column to a full timestamp or to date only, as in the example.

df <- read.csv(pipe("unzip -p myfile.zip"), header = TRUE, colClasses = "character")
df <- df[, c("SPORTS_ID", "SCHEDULED_OFF", "VOLUME_MATCHED")]
df <- df[!is.na(df$SCHEDULED_OFF),]
df$SCHEDULED_OFF <- strptime(df$SCHEDULED_OFF, "%d-%m-%Y")
class(df$SCHEDULED_OFF)
[1] "POSIXlt" "POSIXt" 
df2 <- group_by(df, SCHEDULED_OFF)

The input dataset is > 600k rows. I am sorry I am not authorised to share it

Giacecco

@romainfrancois
Copy link
Member

dplyr does not handle data frames with POSIXlt columns. we need to make this more explicit by giving warnings instead of crashing like that.

@giacecco for future reference, please do the exercise of creating reproducible example. I guess you can easily reproduce the crash without your data set, but with a few lines of generated data.

@giacecco
Copy link
Author

giacecco commented Feb 2, 2014

Got it and sorry for not having setup a basic example showing the issue.

G.

@romainfrancois
Copy link
Member

I've reopened the issue because it is not resolved yet. :)

@hadley hadley added this to the v0.1.2 milestone Feb 17, 2014
@romainfrancois
Copy link
Member

Done now.

@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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants