在 github 中发布 R 代码

Publish an R code in github

我用R写了一些代码,编译成一个包。很遗憾 我无法将它作为一个包发布,这样任何用户都可以使用 install_github() 函数。 请帮忙。

我已经在下面分享了存储库的路径。

https://github.com/Kagereki/RPerio

当我尝试安装您的软件包时出现以下错误:

Error: Line starting 'Population-Based Sur ...' is malformed!

specification for DESCRIPTION files 表示

DESCRIPTION uses a simple file format called DCF, the Debian control format. You can see most of the structure in the simple example below. Each line consists of a field name and a value, separated by a colon. When values span multiple lines, they need to be indented:

Description: The description of a package is usually long,
    spanning multiple lines. The second and subsequent lines
    should be indented, usually with four spaces.

检查your DESCRIPTION file shows that its Description field确实格式错误,第二行没有缩进:

Description: A collection of tools for Case Definitions and prevalences in 
Population-Based Surveillance of Periodontitis. 
  The functionality is experimental and functions are likely to ...

请注意,按照错误消息的建议,此行以“Population-Based Sur ...”开头。

确保您的 DESCRIPTION 格式正确,看看是否能解决问题。

您应该能够使用 devtools 中的 check() 功能来确保在您推送新版本之前一切都在本地工作。