From e9bfabf2e6bbf474c975179f2c0794cd9a4a23ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Thu, 7 Oct 2021 00:50:31 +0200 Subject: [PATCH] Shorter setting names in platform info * `pandoc_version` -> `pandoc` * `rstudio_versionn` -> `rstudio` --- R/platform-info.R | 7 ++++--- tests/testthat/test-platform-info.R | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/R/platform-info.R b/R/platform-info.R index dcc32e5..513b707 100644 --- a/R/platform-info.R +++ b/R/platform-info.R @@ -13,7 +13,8 @@ #' * `ctype`: Native character encoding, from the current locale. #' * `tz`: The current time zone. #' * `date`: The current date. -#' * `rstudio_version`: RStudio format string, only added in RStudio. +#' * `rstudio`: RStudio format string, only added in RStudio. +#' * `pandoc`: pandoc version and path #' #' @seealso Similar functions and objects in the base packages: #' [base::R.version.string], [utils::sessionInfo()], [base::version], @@ -34,8 +35,8 @@ platform_info <- function() { ctype = Sys.getlocale("LC_CTYPE"), tz = Sys.timezone(), date = format(Sys.Date()), - rstudio_version = get_rstudio_version(), - pandoc_version = get_pandoc_version() + rstudio = get_rstudio_version(), + pandoc = get_pandoc_version() ))) } diff --git a/tests/testthat/test-platform-info.R b/tests/testthat/test-platform-info.R index 285ec2b..9a688fc 100644 --- a/tests/testthat/test-platform-info.R +++ b/tests/testthat/test-platform-info.R @@ -4,7 +4,7 @@ test_that("platform_info", { expect_equal( names(pi), c("version", "os", "system", "ui", "language", "collate", "ctype", - "tz", "date", "pandoc_version") + "tz", "date", "pandoc") ) ## This can be a variety of strings, e.g. "R Under development"