gpt4 book ai didi

r - R 包版本中的连字符 (`-` )

转载 作者:行者123 更新时间:2023-12-04 08:56:18 24 4
gpt4 key购买 nike

我依赖的包列表版本如 4.0.4还有0.9-7甚至 0.9-7.1 . (参见 here)。
连字符( - )在包版本控制中是什么意思?如何对其进行版本比较?我找不到任何关于此的文档。

最佳答案

连字符( - )在包版本控制中是什么意思?
连字符在 ?numeric_version 中提到:

"Numeric versions are sequences of one or more non-negative integers, usually (e.g., in package 'DESCRIPTION' files) represented as character strings with the elements of the sequence concatenated and separated by single . or - characters. R package versions consist of at least two such integers."


这里不区分句号 .和连字符 - .但是,正如 Hadley 和 Brian 在 R Packages; Package metadata - Version 中所指出的那样:

I don’t recommend taking full advantage of R’s flexibility. Instead always use . to separate version numbers.


他们指的是 Semantic Versioning ,其中 use of hyphen is described :

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version.



如何对其进行版本比较?
版本对比见 r check if package version is greater than x.y.zR Packages; Package metadata - Version .

关于r - R 包版本中的连字符 (`-` ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63816345/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com