Skip to content

Commit

Permalink
Added the function system_information() that returns some general s…
Browse files Browse the repository at this point in the history
…ystem level information.
  • Loading branch information
loelschlaeger committed Jan 16, 2024
1 parent 02ae757 commit 6705fa9
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 4 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export(sdds_dictionary)
export(simulate_hmm)
export(simulate_markov_chain)
export(stationary_distribution)
export(system_information)
export(test_correlation_matrix)
export(test_covariance_matrix)
export(test_probability_vector)
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Incrementing RoxygenNote to 7.3.0.

* Added the function `system_information()` that returns some general system level information.

# oeli 0.3.2

* Fixed bug in `function_arguments()`.
Expand Down
30 changes: 30 additions & 0 deletions R/package_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,33 @@ renv_development_packages <- function(
usethis::use_build_ignore(paste0(file_name, ".R"))
return(invisible(NULL))
}

#' General system level information
#'
#' @description
#' This function returns a \code{list} of general system level information.
#'
#' @export
#'
#' @return
#' A \code{list} with elements:
#' \itemize{
#' \item \code{maschine}, the model name of the device
#' \item \code{cores}, the number of cores
#' \item \code{RAM}, the size of the RAM
#' \item \code{OS}, the operating system
#' \item \code{r_version}, the R version used
#' }

system_information <- function() {
cpu <- benchmarkme::get_cpu()
list(
"machine" = cpu$model_name,
"cores" = cpu$no_of_cores,
"RAM" = benchmarkme::get_ram(),
"OS" = .Platform$OS.type,
"r_version" = paste(R.version$major, R.version$minor, sep = ".")
)
}


21 changes: 21 additions & 0 deletions man/system_information.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

143 changes: 139 additions & 4 deletions renv.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R": {
"Version": "4.3.0",
"Version": "4.2.2",
"Repositories": [
{
"Name": "CRAN",
Expand Down Expand Up @@ -171,6 +171,43 @@
],
"Hash": "543776ae6848fde2f48ff3816d0628bc"
},
"benchmarkme": {
"Package": "benchmarkme",
"Version": "1.0.8",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"Matrix",
"R",
"benchmarkmeData",
"compiler",
"doParallel",
"dplyr",
"foreach",
"graphics",
"httr",
"methods",
"parallel",
"stringr",
"tibble",
"utils"
],
"Hash": "eaa6ca07e7dfe815da4c1f62a425d9d2"
},
"benchmarkmeData": {
"Package": "benchmarkmeData",
"Version": "1.0.4",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"dplyr",
"graphics",
"tibble",
"utils"
],
"Hash": "03127f8e60281ab3c52f96bb98056dcb"
},
"brew": {
"Package": "brew",
"Version": "1.0-8",
Expand Down Expand Up @@ -262,6 +299,16 @@
],
"Hash": "3f038e5ac7f41d4ac41ce658c85e3042"
},
"codetools": {
"Package": "codetools",
"Version": "0.2-19",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "c089a619a7fae175d149d89164f8c7d8"
},
"colorspace": {
"Package": "colorspace",
"Version": "2.1-0",
Expand Down Expand Up @@ -436,6 +483,20 @@
],
"Hash": "b18a9cf3c003977b0cc49d5e76ebe48d"
},
"doParallel": {
"Package": "doParallel",
"Version": "1.0.17",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"foreach",
"iterators",
"parallel",
"utils"
],
"Hash": "451e5edf411987991ab6a5410c45011f"
},
"downlit": {
"Package": "downlit",
"Version": "0.4.3",
Expand All @@ -456,6 +517,29 @@
],
"Hash": "14fa1f248b60ed67e1f5418391a17b14"
},
"dplyr": {
"Package": "dplyr",
"Version": "1.1.4",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"R6",
"cli",
"generics",
"glue",
"lifecycle",
"magrittr",
"methods",
"pillar",
"rlang",
"tibble",
"tidyselect",
"utils",
"vctrs"
],
"Hash": "fedd9d00c2944ff00a0e2696ccf048ec"
},
"ellipsis": {
"Package": "ellipsis",
"Version": "0.3.2",
Expand Down Expand Up @@ -516,6 +600,19 @@
],
"Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d"
},
"foreach": {
"Package": "foreach",
"Version": "1.5.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"codetools",
"iterators",
"utils"
],
"Hash": "618609b42c9406731ead03adf5379850"
},
"fs": {
"Package": "fs",
"Version": "1.6.2",
Expand All @@ -527,6 +624,17 @@
],
"Hash": "94af08e0aa9675a16fadbb3aaaa90d2a"
},
"generics": {
"Package": "generics",
"Version": "0.1.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"methods"
],
"Hash": "15e9634c0fcd294799e9b2e929ed1b86"
},
"gert": {
"Package": "gert",
"Version": "1.9.2",
Expand Down Expand Up @@ -828,6 +936,17 @@
],
"Hash": "0080607b4a1a7b28979aecef976d8bc2"
},
"iterators": {
"Package": "iterators",
"Version": "1.0.14",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "8954069286b4b2b0d023d1b288dce978"
},
"jquerylib": {
"Package": "jquerylib",
"Version": "0.1.4",
Expand Down Expand Up @@ -1641,6 +1760,22 @@
],
"Hash": "a84e2cc86d07289b3b6f5069df7a004c"
},
"tidyselect": {
"Package": "tidyselect",
"Version": "1.2.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cli",
"glue",
"lifecycle",
"rlang",
"vctrs",
"withr"
],
"Hash": "79540e5fcd9e0435af547d885f184fd5"
},
"tinytex": {
"Package": "tinytex",
"Version": "0.47",
Expand Down Expand Up @@ -1708,17 +1843,17 @@
},
"vctrs": {
"Package": "vctrs",
"Version": "0.6.3",
"Version": "0.6.5",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R",
"cli",
"glue",
"lifecycle",
"rlang"
],
"Hash": "d0ef2856b83dc33ea6e255caf6229ee2"
"Hash": "c03fa420630029418f7e6da3667aac4a"
},
"viridisLite": {
"Package": "viridisLite",
Expand Down

0 comments on commit 6705fa9

Please sign in to comment.