-
Notifications
You must be signed in to change notification settings - Fork 239
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
Comments
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
|
Sure, here's my session info using the line of code you provided:
|
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() |
The pak code also threw an error:
|
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. |
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. |
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:
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:
The text was updated successfully, but these errors were encountered: