When reporting issues on GitHub, it would be nice to have a properly formatted output to paste directly into the ### System Details section of the issue.
The requested format is seen below:
### System details
RStudio Edition : <!-- Desktop or Server -->
RStudio Version :
OS Version :
R Version :
Has there already been thought of providing such a function in rstudioapi?
I'm happy to open a PR if there is interest.
system_details <- function(){
rs_info <- rstudioapi::versionInfo() # only depends on itself
session_info <- sessionInfo()
rstudio_v <- rs_info$long_version
rstudio_ed <- rs_info$mode
os_v <- paste(session_info$R.version$platform, session_info$running)
r_v <- session_info$R.version$version.string
cat(
paste0(
" RStudio Edition : ", rstudio_ed, "\n",
" RStudio Version : ", rstudio_v,"\n",
" OS Version : ", os_v,"\n",
" R Version : ", r_v
)
)
}
# mac
system_details()
#> RStudio Edition : desktop
#> RStudio Version : 2023.09.0-daily+380
#> OS Version : aarch64-apple-darwin20 macOS 13.5
#> R Version : R version 4.2.0 (2022-04-22)
# linux
system_details()
#> RStudio Edition : server
#> RStudio Version : 2023.06.1+524.pro1
#> OS Version : x86_64-pc-linux-gnu Ubuntu 22.04.2 LTS
#> R Version : R version 4.1.3 (2022-03-10)
When reporting issues on GitHub, it would be nice to have a properly formatted output to paste directly into the
### System Details
section of the issue.The requested format is seen below:
Has there already been thought of providing such a function in
rstudioapi
?I'm happy to open a PR if there is interest.