R函数返回一个软件包的许可证? [英] R function to return the license of a package?

查看:91
本文介绍了R函数返回一个软件包的许可证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想返回R软件包的Description文件中声明的软件包许可证(理想情况下,我希望CRAN自动将URL添加到它可以识别的所有通用许可证中).

I'd like to return the package license as declared in the DESCRIPTION file of an R package (ideally I'd rather have the URL that CRAN automatically adds to all the common licenses it recognizes).

我意识到我可以使用

license()

这惊人地不适用于软件包;例如许可证(程序包名称")

which amazingly doesn't apply to packages; e.g. license("packagename")

也不是通过调用citation("packagename")返回的数据.

Nor is this data returned by a call to citation("packagename").

推荐答案

您正在寻找packageDescription

例如:

packageDescription("stats", fields="License")
[1] "Part of R 2.15.3"

packageDescription("ggplot2", fields="License")
[1] "GPL-2"

这篇关于R函数返回一个软件包的许可证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆