You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it attaches all libraries successfully until it gets to the last one (forecast) and then stops with the following message:
Error in as.character(text) :
cannot coerce type 'closure' to vector of type 'character'
3. regexpr("library\\(", x)
2. sandwich.library(pkg)
1. groundhog.library(forecast, today)
The last three lines are given after I click on show traceback in
RStudio 2023.06.1+438 "Mountain Hydrangea" Release (0854207b2c64f6a7049e668177d2753b7e69d57a, 2023-06-27) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.06.1+438 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36.
I am using R version is 4.3.1 and groundhog version 3.1.0 on Windows.
The text was updated successfully, but these errors were encountered:
I suspect the object 'forecast' exists in your environment and when groundhog processes it as an object, rather than pkg name (expecting a character object) R produces the error because it is not a character object.
If you put "forecast" in quotes it should work.
I will put in my to do list for groundhog future revisions to build a data-check at that point to ensure the vector is character.
Note that you can put all packages in a string vector and do it all in one call
I would recommend always putting pkg names in quotes, and using a stable date, so for instance, using 2023-07-01 until you update the R version (to reduce # of pkgs that you need to install).
I have added more robustness to this kind of ambiguity, now, if the argument for pkg is not a character object, it puts it in quotes, so it should seemlessly resolve conflicts like this one. Should go in version groundhog V3.1.1, to be submitted to CRAN later today.
When attaching libraries
it attaches all libraries successfully until it gets to the last one (forecast) and then stops with the following message:
The last three lines are given after I click on
show traceback
inRStudio 2023.06.1+438 "Mountain Hydrangea" Release (0854207b2c64f6a7049e668177d2753b7e69d57a, 2023-06-27) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.06.1+438 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36.
I am using R version is 4.3.1 and groundhog version 3.1.0 on Windows.
The text was updated successfully, but these errors were encountered: