Commit 6181a978 authored by Jonathan Mang's avatar Jonathan Mang 💡
Browse files

refactor: preparation for new release

parent e4e9a55f
Pipeline #23692 passed with stages
in 44 minutes and 7 seconds
......@@ -32,6 +32,7 @@ Imports:
DBI (>= 1.1.0),
Hmisc,
psych,
rapportools,
RJDBC,
RJSONIO,
RPostgres,
......
......@@ -55,7 +55,7 @@ combine_stats <- function(summaries, demo = FALSE) {
for (i in 1:rows) {
## Sample some numbers:
y <-
round(x = rnorm(
round(x = stats::rnorm(
n = sample(1:100, size = 1),
mean = sample(0:100, size = 1),
sd = sample(1:10, size = 1)
......@@ -69,13 +69,13 @@ combine_stats <- function(summaries, demo = FALSE) {
## Setting up the new row:
tmp <- data.table::data.table(
"Min" = min(y),
"Q10" = quantile(y, 0.1),
"Q25" = quantile(y, 0.25),
"Median" = median(y),
"Q10" = stats::quantile(y, 0.1),
"Q25" = stats::quantile(y, 0.25),
"Median" = stats::median(y),
"Mean" = mean(y),
"SD" = sd(y),
"Q75" = quantile(y, 0.75),
"Q90" = quantile(y, 0.9),
"SD" = stats::sd(y),
"Q75" = stats::quantile(y, 0.75),
"Q90" = stats::quantile(y, 0.9),
"Max" = max(y),
"N" = length(y)
)
......
......@@ -58,9 +58,9 @@
#' @return No return value, called for publishing a message.
#' @examples
#' feedback(
#' print_this = "Error occured when counting source_data",
#' print_this = "This is an error message you can provide",
#' type = "Error",
#' findme = "255bb3695c",
#' findme = "215bb3695c",
#' logfile_dir = tempdir(),
#' headless = TRUE
#' )
......
......@@ -28,7 +28,9 @@
#' @examples
#' get_current_timestamp(no_spaces = TRUE)
#' # Result: "2020-12-03-134354"
#' get_current_timestamp() or get_current_timestamp(no_spaces = FALSE)
#' get_current_timestamp()
#' # this is the same like
#' get_current_timestamp(no_spaces = FALSE)
#' # Result: "03.12.2020 - 13:43 UTC"
#'
#' @export
......
......@@ -29,7 +29,7 @@
#' the default mapping are replaced by its values of the mapping.
#'
#' @examples
#' clean_string(input = "Ab 20. April 2020 (((___((N = 1.234)")
#' string_replacements(input = "Ab 20. April 2020 (((___((N = 1.234)")
#' # Result: "Ab_20_April_2020_N_1234"
#'
#' @export
......
......@@ -109,6 +109,8 @@ usethis::use_package("DBI", type = "Imports", min_version = "1.1.0")
usethis::use_package("Hmisc", type = "Imports")
## For `combine_stats`:
usethis::use_package("psych", type = "Imports")
## For `feedback`:
usethis::use_package("rapportools", type = "Imports")
usethis::use_package("RJDBC", type = "Imports")
## For xml_to_json:
usethis::use_package("RJSONIO", type = "Imports")
......
......@@ -77,9 +77,9 @@ This function provides the functionality to publish
}
\examples{
feedback(
print_this = "Error occured when counting source_data",
print_this = "This is an error message you can provide",
type = "Error",
findme = "255bb3695c",
findme = "215bb3695c",
logfile_dir = tempdir(),
headless = TRUE
)
......
......@@ -23,7 +23,9 @@ Function to quickly get the current timestamp without
\examples{
get_current_timestamp(no_spaces = TRUE)
# Result: "2020-12-03-134354"
get_current_timestamp() or get_current_timestamp(no_spaces = FALSE)
get_current_timestamp()
# this is the same like
get_current_timestamp(no_spaces = FALSE)
# Result: "03.12.2020 - 13:43 UTC"
}
......@@ -32,7 +32,7 @@ This function provides the functionality to clean a string
filenames or paths that are not allowed to contain spaces.
}
\examples{
clean_string(input = "Ab 20. April 2020 (((___((N = 1.234)")
string_replacements(input = "Ab 20. April 2020 (((___((N = 1.234)")
# Result: "Ab_20_April_2020_N_1234"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment