英文:
R get list of packages that have a more recent CRAN version
问题
我能够帮你翻译代码部分,请看下面:
如何获取一个包含所有在CRAN上有更新版本的包的数据框?例如:
df <- check_outdated_packages() # 请创建这个函数
> df
package installed_version latest_cran_version
<char> <char> <char>
1: reactable 0.3.0 0.4.4
请注意,这是代码部分的翻译。如果你需要更多帮助或其他问题的翻译,请随时提出。
英文:
How can I get a dataframe of all the packages that have a more recent version in CRAN? For example:
df <- check_outdated_packages() # please create this function
>df
package installed_version latest_cran_version
<char> <char> <char>
1: reactable 0.3.0 0.4.4
答案1
得分: 6
以下是您要翻译的内容:
"?old.packages" 说:
‘old.packages’ 表示在仓库中有一个(合适的)较新版本的软件包,而 ‘update.packages’ 提供下载和安装这些软件包。
它返回:
‘NULL’ 或一个矩阵,每个软件包一行,行名为软件包名称,列名为 ‘"Package"’、‘"LibPath"’、‘"Installed"’(版本)、‘"Built"’(构建版本)、‘"ReposVer"’ 和 ‘"Repository"’。
在我的系统上:
Package LibPath Installed Built ReposVer
admisc "admisc" "/usr/local/lib/R/site-library" "0.31" "4.3.0" "0.32"
clock "clock" "/usr/local/lib/R/site-library" "0.6.1" "4.3.0" "0.7.0"
markdown "markdown" "/usr/local/lib/R/site-library" "1.6" "4.4.0" "1.7"
rticles "rticles" "/usr/local/lib/R/site-library" "0.24" "4.3.0" "0.25"
MASS "MASS" "/usr/local/lib/R/library" "7.3-59" "4.4.0" "7.3-60"
Repository
admisc "https://cloud.r-project.org/src/contrib"
clock "https://cloud.r-project.org/src/contrib"
markdown "https://cloud.r-project.org/src/contrib"
rticles "https://cloud.r-project.org/src/contrib"
MASS "https://cloud.r-project.org/src/contrib"
(我记得这个存在:我使用 apropos("package")
来找到它。)
英文:
?old.packages
says:
> ‘old.packages’ indicates packages which have a (suitable) later
version on the repositories whereas ‘update.packages’ offers to
download and install such packages.
it returns:
> ‘NULL’ or a matrix with one row per package,
row names the package names and column names ‘"Package"’,
‘"LibPath"’, ‘"Installed"’ (the version), ‘"Built"’ (the version
built under), ‘"ReposVer"’ and ‘"Repository"’.
On my system right now:
Package LibPath Installed Built ReposVer
admisc "admisc" "/usr/local/lib/R/site-library" "0.31" "4.3.0" "0.32"
clock "clock" "/usr/local/lib/R/site-library" "0.6.1" "4.3.0" "0.7.0"
markdown "markdown" "/usr/local/lib/R/site-library" "1.6" "4.4.0" "1.7"
rticles "rticles" "/usr/local/lib/R/site-library" "0.24" "4.3.0" "0.25"
MASS "MASS" "/usr/local/lib/R/library" "7.3-59" "4.4.0" "7.3-60"
Repository
admisc "https://cloud.r-project.org/src/contrib"
clock "https://cloud.r-project.org/src/contrib"
markdown "https://cloud.r-project.org/src/contrib"
rticles "https://cloud.r-project.org/src/contrib"
MASS "https://cloud.r-project.org/src/contrib"
(I thought I remembered this existed: I did apropos("package")
to find it.)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论