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
fill not respecting groups? #129
Comments
+1 needs to be fixed. Was pointed here by a comment on my SO thread. http://stackoverflow.com/questions/34517370/group-by-into-fill-not-working-as-expected |
Was this fixed ? I am doing something similar. |
Same problem for me. It looks like |
I've spent a full day trying to find a workaround to this problem. Does anyone have any suggestions? Thanks in advance |
This issue seems fixed. If you feel there's still a same kind of problem, I guess your problem is different, so you should file a new issue with the reproducible example (reprex) for it. library(tidyr)
library(dplyr, warn.conflicts = FALSE)
packageVersion("tidyr")
#> [1] '0.8.1'
df <- data.frame(id="X", Month = 1:3, Year = c(2000, NA, NA))
dfa <- data.frame(id="Y", Month = 1:3, Year = c(NA, 2001, NA))
group_by(rbind(df,dfa),id) %>% tidyr::fill(Year) %>% as.data.frame()
#> id Month Year
#> 1 X 1 2000
#> 2 X 2 2000
#> 3 X 3 2000
#> 4 Y 1 NA
#> 5 Y 2 2001
#> 6 Y 3 2001 Created on 2018-08-04 by the reprex package (v0.2.0). |
The thing is, with a basic df it works, but not with the large df that I have. Could it have something to do with dplyr/plyr/tidyr incompatibilities/bugs?
Sorry for the question, I’m a tidyverse newbie and like I said, I’ve wasted the whole day on this.
Ainhoa
… El 3 ago 2018, a las 23:11, Hiroaki Yutani ***@***.***> escribió:
This issue seems fixed. If you feel there's still a same kind of problem, I guess your problem is different, so you should file a new issue with the reproducible example (reprex) for it.
library(tidyr)
library(dplyr, warn.conflicts = FALSE)
packageVersion("tidyr")
#> [1] '0.8.1'
df <- data.frame(id="X", Month = 1:3, Year = c(2000, NA, NA))
dfa <- data.frame(id="Y", Month = 1:3, Year = c(NA, 2001, NA))
group_by(rbind(df,dfa),id) %>% tidyr::fill(Year) %>% as.data.frame()
#> id Month Year
#> 1 X 1 2000
#> 2 X 2 2000
#> 3 X 3 2000
#> 4 Y 1 NA
#> 5 Y 2 2001
#> 6 Y 3 2001
Created on 2018-08-04 by the reprex package (v0.2.0).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm just saying closed GitHub issues are not the good place to ask questions, especially when you can't provide the reprex. Do you know RStudio Community? I think it's more probable to get the answer there :) |
Thanks, I'll do that. Sorry for the inconvenience.
… El 4 ago 2018, a las 1:06, Hiroaki Yutani ***@***.***> escribió:
I'm just saying closed GitHub issues are a the good place to ask questions, especially when you can't provide the reprex.
Do you know RStudio Community? I think it's more probable to get the answer there :)
https://community.rstudio.com <https://community.rstudio.com/>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#129 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHw-hHA95MIvIbsUl48K6VaunlcqTjC_ks5uNNdvgaJpZM4GVNxs>.
|
It looks like fill isn't respecting groupings in the following
The text was updated successfully, but these errors were encountered: