Closed Kynlinn closed 5 months ago
You seem to be on macOS (please follow the issue guide at the bottom of your post to provide session info). I wonder why you want to install a package from source instead of installing the pre-compiled binary package on CRAN.
I am a beginner. Previously, I had this error Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace 'xfun' 0.37 is already loaded, but >= 0.39 is required
I uninstalled the xfun package and tried to reinstall it
Then all you need to do is install.packages('xfun')
. Or update packages.
I'm curious where you learned this (non-standard) way of installing R packages:
install.packages("~/Downloads/xfun_0.42.tar.gz", repos = NULL, type = "source")
It said "there is no package called ‘xfun’"
You shouldn't install packages inside an R Markdown document, otherwise you would be installing these packages over and over again each time you render the document, which is completely unnecessary. Packages only need to be installed once, and that should be done outside R Markdown (e.g., in your R console, or use the Packages
pane in RStudio).
BTW, would you tell me where you learned the non-standard way of installing R packages as I asked above?
Yes I just downloaded the package and opened it manually by searching in the lower right quadrant
That's how I did
The default value of the Install from
dropdown menu is Repository (CRAN)
. I wonder why you changed it to Package Archive File
, which made the installation more complicated.
The whole thing should have been as simple as "just run install.packages('xfun')
in the R console", or "type the package name in the dialog and hit Install
":
There is no need to manually download a package archive from CRAN or install it from source.
I see it now. Yes, I made things complicated because I know zero about R. Thank you very much for your patient guidance!
You are welcome! Let me know if you have further trouble with installing the package.
By filing an issue to this repo, I promise that
xfun::session_info('xfun')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/xfun')
.I understand that my issue may be closed if I don't fulfill my promises.