[Rd] Question regarding .make_numeric_version with non-character input
Andrea Gilardi
@ndre@@g||@rd| @end|ng |rom po||m|@|t
Fri Mar 29 18:56:48 CET 2024
Dear all,
I have a question regarding the R-devel version of .make_numeric_version() function. As far as I can understand, the current code (https://github.com/wch/r-source/blob/66b91578dfc85140968f07dd4e72d8cb8a54f4c6/src/library/base/R/version.R#L50-L56) runs the following steps in case of non-character input:
1. It creates a message named msg using gettextf.
2. Such object is then passed to stop(msg) or warning(msg) according to the following condition
tolower(Sys.getenv("_R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_") != "false")
However, I don't understand the previous code since the output of Sys.getenv("_R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_") != "false" is just a boolean value and tolower() will just return "true" or "false". Maybe the intended code is tolower(Sys.getenv("_R_CHECK_STOP_ON_INVALID_NUMERIC_VERSION_INPUTS_")) != "false" ? Or am I missing something?
Thank you very much for your help
Kind regards
Andrea
More information about the R-devel
mailing list