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_up() #114

Closed
coolbutuseless opened this Issue Sep 16, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@coolbutuseless

coolbutuseless commented Sep 16, 2015

Feature request: A complementary function to fill() (or even just a flag), that fills upwards.

I currently do this with a rev(zoo::lacf(rev(x))).

@hadley

This comment has been minimized.

Member

hadley commented Sep 16, 2015

Can you provide an example where you see this sort of data?

@coolbutuseless

This comment has been minimized.

coolbutuseless commented Sep 19, 2015

I understand that the fill down is much more common - especially for manually constructed data (like excel spreadsheets) where people enter a value once in a column on the assumption that it is unchanged until the next entry.

I see lots of data - usually after merging - where I want all values filled, but there's no guarantee that the first row contains a value.

As an example: drug trial data where weight (or other demographic data) might be measured on the second visit, but not the first. After merging data sets for analysis, the weight needs to be copied up and down within each subject.

I'm probably an outlier here, and fully understand if this feature is not a priority. Thanks.

@hadley hadley closed this in 37108ce Dec 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment