-
Notifications
You must be signed in to change notification settings - Fork 33
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
Error when using rbind() on pkg_score() outputs #340
Comments
I took a look at the stack trace from this error and this is what I got:
Other folks have a similar issue with As a workaround, how about using |
Confirming that After fixing a typo in the initial example: library(dplyr, quietly = TRUE, warn.conflicts = FALSE)
library(riskmetric)
packageVersion("riskmetric")
#> [1] '0.2.4'
get_pkg_score <- function(this_package){
this_package %>%
pkg_ref(source = "pkg_cran_remote", repos = c("https://cran.rstudio.com")) %>%
as_tibble() %>%
pkg_assess(all_assessments()[1:2]) %>%
pkg_score()
}
score1 <- get_pkg_score("dplyr")
score2 <- get_pkg_score("ggplot2")
dplyr::bind_rows(score1, score2)
#> # A tibble: 2 × 6
#> package version pkg_ref pkg_score bugs_status covr_coverage
#> <chr> <chr> <lst_f_p_> <dbl> <pkg_scor> <pkg_scor>
#> 1 dplyr 1.1.4 dplyr<cran_remote> 0.65 0.7 NA
#> 2 ggplot2 3.5.1 ggplot2<cran_remote> 0.75 0.5 NA
rbind(score1, score2)
#> Error in `vec_slice()`:
#> ! `x` must be a vector, not a <pkg_cran_remote/pkg_remote/pkg_ref/environment> object. Created on 2024-05-16 with reprex v2.1.0 PS chiming in on Karina's behalf, since she's no longer at our company - feel free to tag me directly in any threads! |
I noticed this error when trying to rbind pkg_score() outputs. It seems to be caused by the presence of the
pkg_ref
column:The text was updated successfully, but these errors were encountered: