Repayment status variables that are either string or numeric
When I make an API call for program-level columns on repayment status (e.g., % of borrowers in default),
sc_2018 <- sc_init() %>%
sc_filter(credlev==5) %>%
sc_select(unitid, opeid6, instnm, control, main, cipcode, cipdesc, credlev, creddesc, bbrr2_fed_comp_n,bbrr2_fed_comp_dflt,bbrr2_fed_comp_dlnq,bbrr2_fed_comp_fbr,bbrr2_fed_comp_dfr,bbrr2_fed_comp_noprog,bbrr2_fed_comp_makeprog,bbrr2_fed_comp_paidinfull,bbrr2_fed_comp_discharge) %>%
sc_year(2018) %>%
sc_get()
It returns the following error:
Error in `list_unchop()`:
! Can't combine `x[[22]]$repayment.2_yr_bb_fed_comp.default` <character> and `x[[48]]$repayment.2_yr_bb_fed_comp.default` <double>.
Run `rlang::last_trace()` to see where the error occurred.
Just now seeing this. Is it still an issue? Sometimes the underlying data changes unexpectedly (and then changes back).
It still is. I assume it's because program-level variables in debt are now offered either in actual values or value ranges (e.g., 0.3 - 0.4).
Okay. If that's the case, I'll need a little bit to adjust the code to account for the new data type. If you are able, I'm glad to look at a pull request.
Thank you!
On Mon, Mar 18, 2024 at 1:57 PM Benjamin Skinner @.***> wrote:
Okay. If that's the case, I'll need a little bit to adjust the code to account for the new data type. If you are able, I'm glad to look at a pull request.
— Reply to this email directly, view it on GitHub https://github.com/btskinner/rscorecard/issues/17#issuecomment-2004582618, or unsubscribe https://github.com/notifications/unsubscribe-auth/BATDXOZ42DVNSTBRFKIPIILYY4TIRAVCNFSM6AAAAABEWOPOSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBUGU4DENRRHA . You are receiving this because you authored the thread.Message ID: @.***>
Okay I think I've fixed this. Download the newest release 0.28.0 from GitHub and try it out if you would:
devtools::install_github("btskinner/rscorecard")
Hi Benjamin,
Thank you very much for the update. Could you take a look at the following error message, which newly appeared since the latest update? It occurs when I pull the 2016 and 2017 data. The codes are attached at the end.
Error in purrr::map2():
! Can't recycle
.x(size 5) to match.y(size 71). Runrlang::last_trace()to see where the error occurred.rlang::last_trace() <error/vctrs_error_incompatible_size> Error in
purrr::map2(): ! Can't recycle.x(size 5) to match.y(size 71).
Backtrace: ▆
- ├─... %>% sc_get()
- └─rscorecard::sc_get(.)
- ├─base::suppressWarnings(...)
- │ └─base::withCallingHandlers(...)
- ├─tibble::as_tibble(...)
- └─purrr::map2(...) Run rlang::last_trace(drop = FALSE) to see 6 hidden frames.
And here's my code that returns the error.
sc_2016 <- sc_init() %>% sc_filter(credlev==5) %>% sc_select(unitid, opeid6, instnm, control, main, cipcode, cipdesc, credlev, creddesc, ipedscount1, ipedscount2, bbrr1_fed_comp_dflt) %>% sc_year(2016) %>% sc_get()
On Mon, Mar 25, 2024 at 2:47 PM Benjamin Skinner @.***> wrote:
Okay I think I've fixed this. Download the newest release 0.28.0 from GitHub and try it out if you would:
devtools::install_github("btskinner/rscorecard")
— Reply to this email directly, view it on GitHub https://github.com/btskinner/rscorecard/issues/17#issuecomment-2018674556, or unsubscribe https://github.com/notifications/unsubscribe-auth/BATDXOYKSPFGXLFT2AK3T33Y2BWKPAVCNFSM6AAAAABEWOPOSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYGY3TINJVGY . You are receiving this because you authored the thread.Message ID: @.***>
Try version 0.28.1 (the latest)
It works perfectly. Thank you.
On Tue, Mar 26, 2024 at 3:20 PM Benjamin Skinner @.***> wrote:
Try version 0.28.1 (the latest)
— Reply to this email directly, view it on GitHub https://github.com/btskinner/rscorecard/issues/17#issuecomment-2021286539, or unsubscribe https://github.com/notifications/unsubscribe-auth/BATDXO6IFK3DAQDSLNBKM4TY2HC65AVCNFSM6AAAAABEWOPOSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRGI4DMNJTHE . You are receiving this because you authored the thread.Message ID: @.***>
Closing