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

Error: could not find function "%||%" #817

Closed
daviskec opened this issue Sep 3, 2024 · 6 comments
Closed

Error: could not find function "%||%" #817

daviskec opened this issue Sep 3, 2024 · 6 comments

Comments

@daviskec
Copy link

daviskec commented Sep 3, 2024

Hello, I have been attempting to run a tutorial from the occupancyTuts package https://code.usgs.gov/vtcfwru/occupancyTuts using the line: learnr::run_tutorial(name = "intro", package = "occupancyTuts").

I was initially getting an error about packages being installed under a previous version of R (current version, 4.3.3) so I made an effort to install development versions of any packages that were related to the error, as well as ensuring RStudio was up to date. After doing that, I continued to encounter issues with the occupancy Tuts package, so in an attempt to determine if it was an occupancyTuts issue or a learnr isssue, I ran:

run_tutorial("hello", "learnr")

This produced the following error in the console:

processing file: hello.Rmd
Error in comment_chars[[engine]] %||% "#" : 
  could not find function "%||%"
Calls: .rs.sourceWithProgress ... partition_chunk -> <Anonymous> -> get_option_comment
Execution halted

And the output in the "tutorial" window of Rstudio simply stated: Error: could not find function "%||%"

ChatGPT suggested this might be an issue realted to rlang? Which is one of the packages I updated to the development version.

Here's my session info:

sessioninfo::session_info()
─ Session info ─────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.3 (2024-02-29 ucrt)
 os       Windows 11 x64 (build 22631)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_United States.utf8
 ctype    English_United States.utf8
 tz       America/Buenos_Aires
 date     2024-09-03
 rstudio  2024.04.2+764 Chocolate Cosmos (desktop)
 pandoc   3.1.11 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ─────────────────────────────────────────────────────────────────────────
 package       * version    date (UTC) lib source
 backports       1.5.0      2024-05-23 [1] CRAN (R 4.4.0)
 bit             4.0.5      2022-11-15 [1] CRAN (R 4.4.1)
 bit64           4.0.5      2020-08-30 [1] CRAN (R 4.4.1)
 blob            1.2.4      2023-03-17 [1] CRAN (R 4.4.1)
 cachem          1.1.0      2024-05-16 [1] CRAN (R 4.4.1)
 callr           3.7.6      2024-03-25 [1] CRAN (R 4.4.1)
 checkmate       2.3.2      2024-07-29 [1] CRAN (R 4.4.1)
 class           7.3-22     2023-05-03 [2] CRAN (R 4.3.3)
 classInt        0.4-10     2023-09-05 [1] CRAN (R 4.4.1)
 cli           * 3.6.3.9000 2024-09-03 [1] Github (r-lib/cli@d33aeee)
 codetools       0.2-19     2023-02-01 [2] CRAN (R 4.3.3)
 colorspace      2.1-1      2024-07-26 [1] CRAN (R 4.4.1)
 curl            5.2.2      2024-08-26 [1] CRAN (R 4.3.3)
 DBI             1.2.3      2024-06-02 [1] CRAN (R 4.4.1)
 desc            1.4.3      2023-12-10 [1] CRAN (R 4.4.1)
 digest          0.6.37     2024-08-19 [1] CRAN (R 4.4.1)
 dplyr         * 1.1.4      2023-11-17 [1] CRAN (R 4.4.1)
 e1071           1.7-14     2023-12-06 [1] CRAN (R 4.4.1)
 ecodist         2.1.3      2023-10-30 [1] CRAN (R 4.4.1)
 ellipsis        0.3.2      2021-04-29 [1] CRAN (R 4.4.1)
 evaluate        0.24.0     2024-06-10 [1] CRAN (R 4.4.1)
 fansi           1.0.6      2023-12-08 [1] CRAN (R 4.4.1)
 fastmap         1.2.0      2024-05-15 [1] CRAN (R 4.4.1)
 generics        0.1.3      2022-07-05 [1] CRAN (R 4.4.1)
 ggplot2       * 3.5.1      2024-04-23 [1] CRAN (R 4.4.1)
 ggrepel         0.9.5      2024-01-10 [1] CRAN (R 4.4.1)
 glue            1.7.0      2024-01-09 [1] CRAN (R 4.3.2)
 gridExtra     * 2.3        2017-09-09 [1] CRAN (R 4.4.1)
 gtable          0.3.5      2024-04-22 [1] CRAN (R 4.4.1)
 here            1.0.1      2020-12-13 [1] CRAN (R 4.4.1)
 htmltools       0.5.8.1    2024-04-04 [1] CRAN (R 4.4.1)
 htmlwidgets     1.6.4      2023-12-06 [1] CRAN (R 4.4.1)
 httpuv          1.6.15     2024-03-26 [1] CRAN (R 4.4.1)
 igraph          2.0.3      2024-03-13 [1] CRAN (R 4.4.1)
 jsonlite        1.8.8      2023-12-04 [1] CRAN (R 4.4.1)
 kableExtra    * 1.4.0      2024-01-24 [1] CRAN (R 4.4.1)
 KernSmooth      2.23-22    2023-07-10 [2] CRAN (R 4.3.3)
 knitr           1.48       2024-07-07 [1] CRAN (R 4.4.1)
 later           1.3.2      2023-12-06 [1] CRAN (R 4.4.1)
 lattice         0.22-5     2023-10-24 [2] CRAN (R 4.3.3)
 learnr        * 0.11.5     2023-09-28 [1] CRAN (R 4.3.3)
 lifecycle       1.0.4      2023-11-07 [1] CRAN (R 4.4.1)
 magrittr        2.0.3      2022-03-30 [1] CRAN (R 4.3.2)
 memoise         2.0.1      2021-11-26 [1] CRAN (R 4.4.1)
 mime            0.12       2021-09-28 [1] CRAN (R 4.4.0)
 munsell         0.5.1      2024-04-01 [1] CRAN (R 4.4.1)
 occupancyTuts * 1.1.0      2024-09-03 [1] gitlab (vtcfwru/occupancyTuts@d352058)
 pillar          1.9.0      2023-03-22 [1] CRAN (R 4.4.1)
 pkgbuild        1.4.4      2024-03-17 [1] CRAN (R 4.4.1)
 pkgconfig       2.0.3      2019-09-22 [1] CRAN (R 4.4.1)
 pkgload         1.4.0      2024-06-28 [1] CRAN (R 4.4.1)
 processx        3.8.4      2024-03-16 [1] CRAN (R 4.4.1)
 promises        1.3.0      2024-04-05 [1] CRAN (R 4.4.1)
 proxy           0.4-27     2022-06-09 [1] CRAN (R 4.4.1)
 ps              1.7.7      2024-07-02 [1] CRAN (R 4.4.1)
 purrr           1.0.2      2023-08-10 [1] CRAN (R 4.4.1)
 R6              2.5.1      2021-08-19 [1] CRAN (R 4.4.1)
 raster        * 3.6-26     2023-10-14 [1] CRAN (R 4.4.1)
 Rcpp            1.0.13     2024-07-17 [1] CRAN (R 4.4.1)
 remotes         2.5.0      2024-03-17 [1] CRAN (R 4.4.1)
 renv            1.0.7      2024-04-11 [1] CRAN (R 4.4.1)
 rlang         * 1.1.4.9000 2024-09-03 [1] Github (r-lib/rlang@69659c4)
 rmarkdown       2.28       2024-08-17 [1] CRAN (R 4.4.1)
 RPresence       2.13.56    2024-01-26 [1] local
 rprojroot       2.0.4      2023-11-05 [1] CRAN (R 4.4.1)
 RSQLite       * 2.3.7      2024-05-27 [1] CRAN (R 4.3.3)
 rstudioapi      0.16.0     2024-03-24 [1] CRAN (R 4.4.1)
 scales          1.3.0      2023-11-28 [1] CRAN (R 4.4.1)
 sessioninfo     1.2.2      2021-12-06 [1] CRAN (R 4.4.1)
 sf            * 1.0-16     2024-03-24 [1] CRAN (R 4.4.1)
 shiny           1.9.1      2024-08-01 [1] CRAN (R 4.4.1)
 sp            * 2.1-4      2024-04-30 [1] CRAN (R 4.4.1)
 stringi         1.8.4      2024-05-06 [1] CRAN (R 4.3.3)
 stringr         1.5.1      2023-11-14 [1] CRAN (R 4.4.1)
 svglite         2.1.3      2023-12-08 [1] CRAN (R 4.4.1)
 systemfonts     1.1.0      2024-05-15 [1] CRAN (R 4.4.1)
 terra           1.7-78     2024-05-22 [1] CRAN (R 4.4.1)
 tibble          3.2.1      2023-03-20 [1] CRAN (R 4.4.1)
 tidyr         * 1.3.1      2024-01-24 [1] CRAN (R 4.4.1)
 tidyselect      1.2.1      2024-03-11 [1] CRAN (R 4.4.1)
 units           0.8-5      2023-11-28 [1] CRAN (R 4.4.1)
 utf8            1.2.4      2023-10-22 [1] CRAN (R 4.4.1)
 vctrs           0.6.5      2023-12-01 [1] CRAN (R 4.3.2)
 viridisLite     0.4.2      2023-05-02 [1] CRAN (R 4.4.1)
 withr           3.0.1      2024-07-31 [1] CRAN (R 4.4.1)
 xfun            0.47       2024-08-17 [1] CRAN (R 4.4.1)
 xml2            1.3.6      2023-12-04 [1] CRAN (R 4.4.1)
 xtable          1.8-4      2019-04-21 [1] CRAN (R 4.4.1)
 yaml            2.3.10     2024-07-26 [1] CRAN (R 4.4.1)

 [1] C:/Users/katie/AppData/Local/R/win-library/4.3
 [2] C:/Program Files/R/R-4.3.3/library
@gadenbuie
Copy link
Member

I'm sorry, I can't reproduce the issue. I tried using similar packages on R 4.3.3 in the same version of RStudio. Both the tutorials from learnr and occupancyTuts worked for me.

Can you run sessioninfo::session_info(c("learnr", "occupancyTuts")) to limit the session info to the relevant packages? Here's mine:

─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.3 (2024-02-29)
 os       macOS Sonoma 14.5
 system   aarch64, darwin20
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2024-09-03
 rstudio  2024.04.2+764 Chocolate Cosmos (desktop)
 pandoc   3.3 @ /opt/homebrew/bin/pandoc

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package       * version     date (UTC) lib source
 backports       1.5.0       2024-05-23 [1] CRAN (R 4.3.3)
 base64enc       0.1-3       2015-07-28 [1] CRAN (R 4.3.0)
 bslib           0.8.0       2024-07-29 [1] CRAN (R 4.3.3)
 cachem          1.1.0       2024-05-16 [1] CRAN (R 4.3.3)
 checkmate       2.3.2       2024-07-29 [1] CRAN (R 4.3.3)
 cli             3.6.3       2024-06-21 [1] CRAN (R 4.3.3)
 colorspace      2.1-0       2023-01-23 [1] CRAN (R 4.3.0)
 commonmark      1.9.1       2024-01-30 [1] CRAN (R 4.3.2)
 cpp11           0.4.7       2023-12-02 [1] CRAN (R 4.3.1)
 crayon          1.5.3       2024-06-20 [1] CRAN (R 4.3.3)
 digest          0.6.37      2024-08-19 [1] CRAN (R 4.3.3)
 dplyr           1.1.4       2023-11-17 [1] CRAN (R 4.3.1)
 evaluate        0.24.0      2024-06-10 [1] CRAN (R 4.3.3)
 fansi           1.0.6       2023-12-08 [1] CRAN (R 4.3.1)
 farver          2.1.1       2022-07-06 [1] CRAN (R 4.3.0)
 fastmap         1.2.0       2024-05-15 [1] CRAN (R 4.3.3)
 fontawesome     0.5.2.9000  2023-11-16 [1] Github (rstudio/fontawesome@b056eca)
 fs              1.6.4       2024-04-25 [1] CRAN (R 4.3.1)
 generics        0.1.3       2022-07-05 [1] CRAN (R 4.3.0)
 ggplot2         3.5.0       2024-02-23 [1] CRAN (R 4.3.1)
 glue            1.7.0       2024-01-09 [1] CRAN (R 4.3.1)
 gridExtra       2.3         2017-09-09 [1] CRAN (R 4.3.0)
 gtable          0.3.4       2023-08-21 [1] CRAN (R 4.3.0)
 highr           0.11        2024-05-26 [1] CRAN (R 4.3.3)
 htmltools       0.5.8.1     2024-04-04 [1] CRAN (R 4.3.1)
 htmlwidgets     1.6.4       2023-12-06 [1] CRAN (R 4.3.1)
 httpuv          1.6.15      2024-03-26 [1] CRAN (R 4.3.1)
 isoband         0.2.7       2022-12-20 [1] CRAN (R 4.3.0)
 jquerylib       0.1.4       2021-04-26 [1] CRAN (R 4.3.0)
 jsonlite        1.8.8       2023-12-04 [1] CRAN (R 4.3.1)
 kableExtra      1.4.0       2024-01-24 [1] CRAN (R 4.3.1)
 knitr           1.48        2024-07-07 [1] CRAN (R 4.3.3)
 labeling        0.4.3       2023-08-29 [1] CRAN (R 4.3.0)
 later           1.3.2       2023-12-06 [1] CRAN (R 4.3.1)
 lattice         0.22-6      2024-03-20 [1] CRAN (R 4.3.1)
 learnr          0.11.5.9000 2024-09-03 [1] local
 lifecycle       1.0.4       2023-11-07 [1] CRAN (R 4.3.2)
 magrittr        2.0.3       2022-03-30 [1] CRAN (R 4.3.0)
 markdown        1.13        2024-06-04 [1] CRAN (R 4.3.3)
 MASS            7.3-60.0.1  2024-01-13 [1] CRAN (R 4.3.1)
 Matrix          1.6-5       2024-01-11 [1] CRAN (R 4.3.1)
 memoise         2.0.1       2021-11-26 [1] CRAN (R 4.3.0)
 mgcv            1.9-1       2023-12-21 [1] CRAN (R 4.3.1)
 mime            0.12        2021-09-28 [1] CRAN (R 4.3.0)
 munsell         0.5.1       2024-04-01 [1] CRAN (R 4.3.1)
 nlme            3.1-164     2023-11-27 [1] CRAN (R 4.3.1)
 occupancyTuts   1.1.0       2024-09-03 [1] gitlab (vtcfwru/occupancyTuts@d352058)
 pillar          1.9.0       2023-03-22 [1] CRAN (R 4.3.0)
 pkgconfig       2.0.3       2019-09-22 [1] CRAN (R 4.3.0)
 promises        1.3.0       2024-04-05 [1] CRAN (R 4.3.1)
 purrr           1.0.2       2023-08-10 [1] CRAN (R 4.3.0)
 R6              2.5.1       2021-08-19 [1] CRAN (R 4.3.0)
 rappdirs        0.3.3       2021-01-31 [1] CRAN (R 4.3.0)
 RColorBrewer    1.1-3       2022-04-03 [1] CRAN (R 4.3.0)
 Rcpp            1.0.13      2024-07-17 [1] CRAN (R 4.3.3)
 renv            1.0.7       2024-04-11 [1] CRAN (R 4.3.1)
 rlang           1.1.4       2024-06-04 [1] CRAN (R 4.3.3)
 rmarkdown       2.28        2024-08-17 [1] CRAN (R 4.3.3)
 rprojroot       2.0.4       2023-11-05 [1] CRAN (R 4.3.1)
 rstudioapi      0.16.0.9000 2024-05-02 [1] Github (rstudio/rstudioapi@a985492)
 sass            0.4.9       2024-03-15 [1] CRAN (R 4.3.1)
 scales          1.3.0       2023-11-28 [1] CRAN (R 4.3.1)
 shiny           1.9.1       2024-08-01 [1] CRAN (R 4.3.3)
 sourcetools     0.1.7-1     2023-02-01 [1] CRAN (R 4.3.0)
 stringi         1.8.3       2023-12-11 [1] CRAN (R 4.3.1)
 stringr         1.5.1       2023-11-14 [1] CRAN (R 4.3.1)
 svglite         2.1.3       2023-12-08 [1] CRAN (R 4.3.1)
 systemfonts     1.0.6       2024-03-07 [1] CRAN (R 4.3.1)
 tibble          3.2.1       2023-03-20 [1] CRAN (R 4.3.0)
 tidyr           1.3.1       2024-01-24 [1] CRAN (R 4.3.1)
 tidyselect      1.2.1       2024-03-11 [1] CRAN (R 4.3.1)
 tinytex         0.52        2024-07-18 [1] CRAN (R 4.3.3)
 utf8            1.2.4       2023-10-22 [1] CRAN (R 4.3.1)
 vctrs           0.6.5       2023-12-01 [1] CRAN (R 4.3.1)
 viridisLite     0.4.2       2023-05-02 [1] CRAN (R 4.3.0)
 withr           3.0.1       2024-07-31 [1] CRAN (R 4.3.3)
 xfun            0.47        2024-08-17 [1] CRAN (R 4.3.3)
 xml2            1.3.6       2023-12-04 [1] CRAN (R 4.3.1)
 xtable          1.8-4       2019-04-21 [1] CRAN (R 4.3.0)
 yaml            2.3.10      2024-07-26 [1] CRAN (R 4.3.3)

 [1] /Users/garrick/Library/R/arm64/4.3/library
 [2] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

@daviskec
Copy link
Author

daviskec commented Sep 4, 2024

Sure, here's my session info using the line of code you provided:

sessioninfo::session_info(c("learnr", "occupancyTuts"))
─ Session info ────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.3 (2024-02-29 ucrt)
 os       Windows 11 x64 (build 22631)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_United States.utf8
 ctype    English_United States.utf8
 tz       America/Buenos_Aires
 date     2024-09-04
 rstudio  2024.04.2+764 Chocolate Cosmos (desktop)
 pandoc   3.1.11 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ────────────────────────────────────────────────────────────────────────
 package       * version    date (UTC) lib source
 backports       1.5.0      2024-05-23 [1] CRAN (R 4.4.0)
 base64enc       0.1-3      2015-07-28 [1] CRAN (R 4.4.0)
 bslib           0.8.0      2024-07-29 [1] CRAN (R 4.4.1)
 cachem          1.1.0      2024-05-16 [1] CRAN (R 4.4.1)
 checkmate       2.3.2      2024-07-29 [1] CRAN (R 4.4.1)
 cli             3.6.3.9000 2024-09-03 [1] Github (r-lib/cli@d33aeee)
 colorspace      2.1-1      2024-07-26 [1] CRAN (R 4.4.1)
 commonmark      1.9.1      2024-01-30 [1] CRAN (R 4.4.1)
 cpp11           0.5.0      2024-08-27 [1] CRAN (R 4.3.3)
 crayon          1.5.3      2024-06-20 [1] CRAN (R 4.4.1)
 digest          0.6.37     2024-08-19 [1] CRAN (R 4.4.1)
 dplyr           1.1.4      2023-11-17 [1] CRAN (R 4.4.1)
 ellipsis        0.3.2      2021-04-29 [1] CRAN (R 4.4.1)
 evaluate        0.24.0     2024-06-10 [1] CRAN (R 4.4.1)
 fansi           1.0.6      2023-12-08 [1] CRAN (R 4.4.1)
 farver          2.1.2      2024-05-13 [1] CRAN (R 4.4.1)
 fastmap         1.2.0      2024-05-15 [1] CRAN (R 4.4.1)
 fontawesome     0.5.2      2023-08-19 [1] CRAN (R 4.4.1)
 fs              1.6.4      2024-04-25 [1] CRAN (R 4.4.1)
 generics        0.1.3      2022-07-05 [1] CRAN (R 4.4.1)
 ggplot2         3.5.1      2024-04-23 [1] CRAN (R 4.4.1)
 glue            1.7.0      2024-01-09 [1] CRAN (R 4.3.2)
 gridExtra       2.3        2017-09-09 [1] CRAN (R 4.4.1)
 gtable          0.3.5      2024-04-22 [1] CRAN (R 4.4.1)
 highr           0.11       2024-05-26 [1] CRAN (R 4.4.1)
 htmltools       0.5.8.1    2024-04-04 [1] CRAN (R 4.4.1)
 htmlwidgets     1.6.4      2023-12-06 [1] CRAN (R 4.4.1)
 httpuv          1.6.15     2024-03-26 [1] CRAN (R 4.4.1)
 isoband         0.2.7      2022-12-20 [1] CRAN (R 4.4.1)
 jquerylib       0.1.4      2021-04-26 [1] CRAN (R 4.4.1)
 jsonlite        1.8.8      2023-12-04 [1] CRAN (R 4.4.1)
 kableExtra      1.4.0      2024-01-24 [1] CRAN (R 4.4.1)
 knitr           1.48       2024-07-07 [1] CRAN (R 4.4.1)
 labeling        0.4.3      2023-08-29 [1] CRAN (R 4.4.0)
 later           1.3.2      2023-12-06 [1] CRAN (R 4.4.1)
 lattice         0.22-5     2023-10-24 [2] CRAN (R 4.3.3)
 learnr        * 0.11.5     2023-09-28 [1] CRAN (R 4.3.3)
 lifecycle       1.0.4      2023-11-07 [1] CRAN (R 4.4.1)
 magrittr        2.0.3      2022-03-30 [1] CRAN (R 4.3.2)
 markdown        1.13       2024-06-04 [1] CRAN (R 4.4.1)
 MASS            7.3-60.0.1 2024-01-13 [2] CRAN (R 4.3.3)
 Matrix          1.6-5      2024-01-11 [2] CRAN (R 4.3.3)
 memoise         2.0.1      2021-11-26 [1] CRAN (R 4.4.1)
 mgcv            1.9-1      2023-12-21 [2] CRAN (R 4.3.3)
 mime            0.12       2021-09-28 [1] CRAN (R 4.4.0)
 munsell         0.5.1      2024-04-01 [1] CRAN (R 4.4.1)
 nlme            3.1-164    2023-11-27 [2] CRAN (R 4.3.3)
 occupancyTuts * 1.1.0      2024-09-03 [1] gitlab (vtcfwru/occupancyTuts@d352058)
 pillar          1.9.0      2023-03-22 [1] CRAN (R 4.4.1)
 pkgconfig       2.0.3      2019-09-22 [1] CRAN (R 4.4.1)
 promises        1.3.0      2024-04-05 [1] CRAN (R 4.4.1)
 purrr           1.0.2      2023-08-10 [1] CRAN (R 4.4.1)
 R6              2.5.1      2021-08-19 [1] CRAN (R 4.4.1)
 rappdirs        0.3.3      2021-01-31 [1] CRAN (R 4.4.1)
 RColorBrewer    1.1-3      2022-04-03 [1] CRAN (R 4.4.0)
 Rcpp            1.0.13     2024-07-17 [1] CRAN (R 4.4.1)
 renv            1.0.7      2024-04-11 [1] CRAN (R 4.4.1)
 rlang           1.1.4.9000 2024-09-03 [1] Github (r-lib/rlang@69659c4)
 rmarkdown       2.28       2024-08-17 [1] CRAN (R 4.4.1)
 rprojroot       2.0.4      2023-11-05 [1] CRAN (R 4.4.1)
 rstudioapi      0.16.0     2024-03-24 [1] CRAN (R 4.4.1)
 sass            0.4.9      2024-03-15 [1] CRAN (R 4.4.1)
 scales          1.3.0      2023-11-28 [1] CRAN (R 4.4.1)
 shiny           1.9.1      2024-08-01 [1] CRAN (R 4.4.1)
 sourcetools     0.1.7-1    2023-02-01 [1] CRAN (R 4.4.1)
 stringi         1.8.4      2024-05-06 [1] CRAN (R 4.3.3)
 stringr         1.5.1      2023-11-14 [1] CRAN (R 4.4.1)
 svglite         2.1.3      2023-12-08 [1] CRAN (R 4.4.1)
 systemfonts     1.1.0      2024-05-15 [1] CRAN (R 4.4.1)
 tibble          3.2.1      2023-03-20 [1] CRAN (R 4.4.1)
 tidyr           1.3.1      2024-01-24 [1] CRAN (R 4.4.1)
 tidyselect      1.2.1      2024-03-11 [1] CRAN (R 4.4.1)
 tinytex         0.52       2024-07-18 [1] CRAN (R 4.4.1)
 utf8            1.2.4      2023-10-22 [1] CRAN (R 4.4.1)
 vctrs           0.6.5      2023-12-01 [1] CRAN (R 4.3.2)
 viridisLite     0.4.2      2023-05-02 [1] CRAN (R 4.4.1)
 withr           3.0.1      2024-07-31 [1] CRAN (R 4.4.1)
 xfun            0.47       2024-08-17 [1] CRAN (R 4.4.1)
 xml2            1.3.6      2023-12-04 [1] CRAN (R 4.4.1)
 xtable          1.8-4      2019-04-21 [1] CRAN (R 4.4.1)
 yaml            2.3.10     2024-07-26 [1] CRAN (R 4.4.1)

 [1] C:/Users/katie/AppData/Local/R/win-library/4.3
 [2] C:/Program Files/R/R-4.3.3/library

@gadenbuie
Copy link
Member

Interesting. One thing I noticed from your session info is that you are using R 4.3.3 but many of your packages say they were built for R 4.4. I wonder if that's causing you the issues you're seeing? I think you can re-install learnr and its dependencies using pak:

# install.packages("pak")
pak::pkg_deps("learnr")$package |> pak::pkg_install()

@daviskec
Copy link
Author

daviskec commented Sep 4, 2024

The pak code also threw an error:


pak::pkg_deps("learnr")$package \|> pak::pkg_install() Error:                                                                      ! error in pak subprocess Caused by error in `get("pkg_deps_internal", asNamespace("pak"))(...)`: ! unused arguments (lib = "C:/Users/katie/AppData/Local/R/win-library/4.3", ask = TRUE, start = 1725458125.77407, loaded = c("utf8", "generics", "renv", "learnr", "RSQLite", "digest", "magrittr", "evaluate", "fastmap", "blob", "rprojroot", "jsonlite", "backports", "RPresence", "DBI", "promises", "fansi", "ecodist", "cli", "shiny", "rlang", "pak", "ellipsis", "bit64", "yaml", "withr", "cachem", "checkmate", "memoise", "dplyr", "httpuv", "here", "vctrs", "R6", "mime", "lifecycle", "htmlwidgets", "bit", "pkgconfig",  "pillar", "later", "glue", "Rcpp", "xfun", "tibble", "tidyselect", "rstudioapi", "knitr", "xtable", "htmltools", "igraph")) Type .Last.error to see the more details. > .Last.error <callr_error/rlib_error_3_0/rlib_error/error> Error:  ! error in pak subprocess Caused by error in `get("pkg_deps_internal", asNamespace("pak"))(...)`: ! unused arguments (lib = "C:/Users/katie/AppData/Local/R/win-library/4.3", ask = TRUE, start = 1725458125.77407, loaded = c("utf8", "generics", "renv", "learnr", "RSQLite", "digest", "magrittr", "evaluate", "fastmap", "blob", "rprojroot", "jsonlite", "backports", "RPresence", "DBI", "promises", "fansi", "ecodist", "cli", "shiny", "rlang", "pak", "ellipsis", "bit64", "yaml", "withr", "cachem", "checkmate", "memoise", "dplyr", "httpuv", "here", "vctrs", "R6", "mime", "lifecycle", "htmlwidgets", "bit", "pkgconfig",  "pillar", "later", "glue", "Rcpp", "xfun", "tibble", "tidyselect", "rstudioapi", "knitr", "xtable", "htmltools", "igraph")) --- Backtrace: 1. pak::pkg_install(pak::pkg_deps("learnr")$package) 2. pak:::remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), … 3. err$throw(res$error) --- Subprocess backtrace: 1. base::withCallingHandlers(cli_message = function(msg) { … 2. base::.handleSimpleError(function (e) … 3. global h(simpleError(msg, call))

@daviskec
Copy link
Author

daviskec commented Sep 4, 2024

I may have found the issue - it looks like I have two versions of R installed and Rstudio is calling on the older one. I'm heading into a meeting but will update if I resolve this later today.

@daviskec
Copy link
Author

daviskec commented Sep 4, 2024

It took a while, but it appears that I had two versions of R installed on my laptop, 4.3.X from April and 4.4.X from August. Removing 4.3.X, installing the version 4.4 of Rtools, and reinstalling packages appears to have resolved the issues.

@daviskec daviskec closed this as completed Sep 4, 2024
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

2 participants