r - Request the latest CRAN package version by source when binaries not yet up -
i wish users install package cran latest source newer windows , macos binaries.
so, give concrete example, install.packages("umx")
installs the recent binary, older source version accepted on cran.
install.packages
doesn't alert user newer source available.
however, user can newest source going cran page, looking direct link, , using input pkgs
in install.packages:
browseurl("https://cran.r-project.org/web/packages/umx/index.html") install.packages("https://cran.r-project.org/src/contrib/umx_1.7.5.tar.gz") # newest version (1.7.5) installed source.
but want more automated method request latest source. thought requesting type = "source"
latest source, tries source of older (1.55) version binaries available, , fails:
install.packages("umx", type= "source") ... url 'https://cran.rstudio.com/src/contrib/umx_1.5.5.tar.gz': status '404 not found'
any solutions?
i whole set of warnings , errors when trying build source, because xml
doesn't want build cleanly. if install type = "source"
, dependencies installed source well. however, if do:
install.packages("umx")
it warn me there's newer source version , installs version 1.7.5 source, while installs dependencies binary. because default option argument type
"both"
, means on windows installs binary unless there's no binary or more recent source version.
if don't see warning, try forcing using
install.packages("umx", type = "both")
note requires rtools installed. rtools not package, toolset needed build packages source. rtools available download on cran. sure read installation instructions carefully!
as per today , on r3.3.3,
install.packages("umx", type = "source")
does try install umx
version 1.7.5 source, whole set of other packages btw. fails explained above due errors in compilation xml
(and possibly other) package(s).
installing specific/older versions source
if want install specific version, download .tar.gz file of related version, store on computer , install using:
install.packages("path/to/umx_1.7.5.tar.gz", type = "source", repos = null)
this install downloaded .tar.gz file, you'll have ensure dependencies installed before build package source.
checking whether there problem
keep in mind though installing source not smart idea. should check @ least check results package on cran. in case seems version 1.7.5 can cause troubles, shown cran results different builds @ https://cran.r-project.org/web/checks/check_results_umx.html
Comments
Post a Comment