Short R Version String
From base R's R.version.string
, produce a somewhat
shorter version, with or without date, notably also for patched or
development versions of R.
Main use is for plotting or construction of file of variable names.
shortRversion(Rv = R.version, Rst = Rv$status, Rvstring = if (!is.null(s <- Rv$version.string)) s else R.version.string, date = Rst != "", spaces = TRUE)
Rv |
|
Rst |
a string specifying the status of R's version. For
released versions of R, this is |
Rvstring |
a string with a default that should work even for R versions previous to 1.0.0. |
date |
logical specifying if the date of the R version should be included in the result; by default, this will be true only for non-released versions of R. |
spaces |
logical indicating if the result may contain spaces (aka
‘blanks’); setting it to false, replaces the blanks by |
a character
string, typically a shortened version of Rvstring
.
Martin Maechler
shortRversion() ## (including the date, typically for an R Core developer) ## but this is shorter: (Rver <- shortRversion(date=FALSE)) shortRversion(spaces=FALSE)# e.g. for a file of even directory name shortRversion(spaces=FALSE, date=FALSE)# even shorter, ditto ## If you want even shorter { abbreviate() will remove spaces, too }: abbreviate(shortRversion(), 11) abbreviate(shortRversion(date=FALSE), 13)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.