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

fill_gaps seems to be not working on yearmonth #307

Closed
USMortality opened this issue Mar 2, 2024 · 1 comment
Closed

fill_gaps seems to be not working on yearmonth #307

USMortality opened this issue Mar 2, 2024 · 1 comment

Comments

@USMortality
Copy link

fill_gaps seems to be not working on yearmonth:

harvest <- tsibble(
  date = c(
    make_yearmonth(year = 2000, month = 1),
    make_yearmonth(year = 2000, month = 4)
  ),
  fruit = rep(c("kiwi", "cherry"), each = 1),
  index = date
)

# gaps as default `NA`
fill_gaps(harvest, .full = TRUE)

output:

# A tsibble: 2 x 2 [3M]
      date fruit 
     <mth> <chr> 
1 2000 Jan kiwi  
2 2000 Apr cherry

Expected would be to have it fill Feb, March with fruit = NA.

@USMortality
Copy link
Author

Looks like this fixed it: https://stackoverflow.com/a/75981369/2302437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant