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

fredr() and parameter vintage_dates #88

Closed
cgarciga opened this issue Dec 23, 2020 · 5 comments
Closed

fredr() and parameter vintage_dates #88

cgarciga opened this issue Dec 23, 2020 · 5 comments
Assignees
Labels

Comments

@cgarciga
Copy link

From https://cran.r-project.org/web/packages/fredr/fredr.pdf under fred_series_observations:

image

However, it appears that fredr cannot accept more than one date for parameter vintage_dates:

image

Ideally, when passing multiple dates to vintage_dates, a fourth column in the return tibble called, for example, vintage_date would denote which vintage that data point is from.

@sboysel
Copy link
Owner

sboysel commented Dec 23, 2020

Nice catch! The API parameter itself accepts a comma separated string of dates but it seems we didn't accommodate for that in the vintage_dates parameter of fredr(). I can take a stab at this shortly.

@sboysel sboysel added the bug label Dec 23, 2020
@sboysel sboysel self-assigned this Dec 23, 2020
@cgarciga
Copy link
Author

Thanks! And, thanks for the quick response!

@sboysel
Copy link
Owner

sboysel commented Jan 4, 2021

Should be fixed with #89

fredr::fredr(series_id = "GDPC1", vintage_dates = as.Date(c("1991-12-04", "1991-12-20")))
#> # A tibble: 132 x 3
#>    date       series_id value
#>    <date>     <chr>     <dbl>
#>  1 1959-01-01 GDPC1     1910.
#>  2 1959-04-01 GDPC1     1941.
#>  3 1959-07-01 GDPC1     1932.
#>  4 1959-10-01 GDPC1     1943.
#>  5 1960-01-01 GDPC1     1978.
#>  6 1960-04-01 GDPC1     1974.
#>  7 1960-07-01 GDPC1     1976.
#>  8 1960-10-01 GDPC1     1965.
#>  9 1961-01-01 GDPC1     1980.
#> 10 1961-04-01 GDPC1     2009.
#> # … with 122 more rows

Created on 2021-01-04 by the reprex package (v0.3.0)

@sboysel
Copy link
Owner

sboysel commented Jan 5, 2021

This change has now been merged the master branch with #89. Will do another CRAN release soon but in the meantime, you can install with devtools::install_github().

@sboysel sboysel closed this as completed Jan 5, 2021
@cgarciga
Copy link
Author

cgarciga commented Jan 6, 2021

Thank you!

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

No branches or pull requests

2 participants