Open allayebarou23 opened 3 years ago
This catches a lot of learners. Make sure library(shiny)
is at the start of your script and - here's the catch - make sure "I" is capitalized and every other letter isn't. If R can't find that function, it's either not loaded or not capitalized properly (usually!).
@allayebarou23 I had the same error this morning. Once I added library(shiny) into the code chunk, it worked. Good luck!
@jamisoncrawford thank you. I was stuck on there for a while. It's working now.
I am having the same issue, but when I run library(shiny) in the code chunk I get this error message.
Error: package or namespace load failed for ‘shiny’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘rlang’ 0.4.7 is already loaded, but >= 0.4.9 is required
I tried updating the 'rlang' package but it doesn't look like it updated to the correct version, and I am still getting the same error message.
@ellihammons21 can you try to reinstall shiny
with install.packages()
? Keep us updated!
I tried to reinstall shiny with install.packages() and am still getting the same error.
Error: package or namespace load failed for ‘shiny’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘rlang’ 0.4.7 is already loaded, but >= 0.4.9 is required
This can be tough to diagnose. Please email me your .R
file and I will have a look at it.
Also, what versions of R and RStudio are you using?
Ok, I will go ahead and email you the .r file. I am currently using R version 4.0.2 (2020-06-22). Thanks!
@ellihammons21 I am guessing you are trying to install the package in R Studio?
R Studio needs to load some packages in the background so it can lock files that you are trying to replace. I suspect that's what this error is:
namespace ‘rlang’ 0.4.7 is already loaded, but >= 0.4.9 is required
I would close down R Studio, open a basic R console, then try installing rlang. If that works install shiny then.
Success! I closed down RStudio and installed rlang and shiny in a basic r console. Now, when I opened RStudio and ran library(shiny) in the code chunk, it was able to run the code successfully.
Thanks to everyone!
All thanks to @lecy! Good call!
When I try to run the selectInput chunk I get this error Error in selectInput(inputId = "my_team", label = "Select a team:", choices = c("New York Yankees", : could not find function "selectInput"