简体   繁体   English

R如何在线提供我的包裹

[英]R how to make my package available online

I have developed a R package, and I want to let anyone uses it by calling 我开发了一个R包,我想让任何人通过调用来使用它

install.packages(my package name)

help? 救命?

I tried to search on Google, and I installed some libraries to do that but these libraries make my package corrupted so i thought to ask you maybe you suggest me the best way 我试图在谷歌搜索,我安装了一些库来做到这一点,但这些库使我的包损坏所以我想问你也许你建议我最好的方式

i would like if i have my package on github thanks 我想如果我有我的包在github谢谢

I think the best thing to do would be to go over to GitHub and do some reading. 我认为最好的办法是去GitHub并做一些阅读。 You mention in the comments that you want the user to be able to use install.packages() and not install_github() . 您在评论中提到您希望用户能够使用install.packages()不是 install_github() For that you'll need to either submit your package to CRAN or make the tarball source available for download somewhere so that the user can install from source after download. 为此,您需要将软件包提交给CRAN,或者让tarball源可以在某处下载,以便用户可以在下载后从源代码安装。

The CRAN Repository Policy is a good thing to read, as well as Writing R Extentions and of course all the info at GitHub. CRAN存储库策略是一个很好的阅读,以及写入R Extentions ,当然还有GitHub上的所有信息。

By the way, devtools::install_github() is very widely used, so you may want to rethink your stance on only using install.packages() if not submitting to CRAN. 顺便说一句, devtools::install_github()被广泛使用,所以如果不提交给CRAN,你可能只想使用install.packages()重新考虑你的立场。

I have developed a R package, and I want to let anyone uses it by calling 我开发了一个R包,我想让任何人通过调用来使用它

install.packages(my package name)

help? 救命?

That is precisely what drat is for. 这正是drat的用途。 It lets you create a repository and by far the easiest way is just to let GitHub host it. 它允许您创建一个存储库 ,到目前为止最简单的方法就是让GitHub托管它。 The package vignettes detail how. 包装内容如下所示。

See the drat documentation, or the blog posts about it . 请参阅drat文档或有关它博客文章 Also that we discussed just today in the r-packages-devel list how drat can help as an additional_repostitories even for CRAN packages. 另外我们今天在r-packages-devel列表中讨论了drat如何作为一个additional_repostitories来帮助,即使对于CRAN包也是如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM