Package: DIZtools 1.0.1

Jonathan M. Mang

DIZtools: Lightweight Utilities for 'DIZ' R Package Development

Lightweight utility functions used for the R package development infrastructure inside the data integration centers ('DIZ') to standardize and facilitate repetitive tasks such as setting up a database connection or issuing notification messages and to avoid redundancy.

Authors:Jonathan M. Mang [aut, cre], Lorenz A. Kapsner [aut], MIRACUM - Medical Informatics in Research and Care in University Medicine [fnd], Universitätsklinikum Erlangen, Germany [cph]

DIZtools_1.0.1.tar.gz
DIZtools_1.0.1.zip(r-4.5)DIZtools_1.0.1.zip(r-4.4)DIZtools_1.0.1.zip(r-4.3)
DIZtools_1.0.1.tgz(r-4.4-any)DIZtools_1.0.1.tgz(r-4.3-any)
DIZtools_1.0.1.tar.gz(r-4.5-noble)DIZtools_1.0.1.tar.gz(r-4.4-noble)
DIZtools_1.0.1.tgz(r-4.4-emscripten)DIZtools_1.0.1.tgz(r-4.3-emscripten)
DIZtools.pdf |DIZtools.html
DIZtools/json (API)
NEWS

# Install 'DIZtools' in R:
install.packages('DIZtools', repos = c('https://miracum.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/miracum/misc-diztools/issues

On CRAN:

snippetstools

34 exports 3 stars 1.80 score 10 dependencies 3 dependents 2 scripts 933 downloads

Last updated 1 years agofrom:bd462df775. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 12 2024
R-4.5-winOKSep 12 2024
R-4.5-linuxOKSep 12 2024
R-4.4-winOKSep 12 2024
R-4.4-macOKSep 12 2024
R-4.3-winOKSep 12 2024
R-4.3-macOKSep 12 2024

Exports:%notin%assign_to_R_envcheck_if_unique_rowsclean_path_namecleanup_old_logfileclearclose_all_connectionsdt_row_to_stringequals2feedbackfile_lines_to_listfirstupformat_posixctget_configget_current_timestampis_date_formatis.emptylog_get_current_optionslog_get_default_optionslog_remove_optionslog_set_defaultsnumber_to_positionpaste_pct_sumpaste2pretty_timestamprep2robust_roundsetdiff_allsetenv_filesetenv2string_replacementstime_diff_printtrim.spacevgsub

Dependencies:cleaRconfigdata.tableloggermagrittrparsedateR.methodsS3R.ooR.utilsyaml

Readme and manuals

Help Manual

Help pageTopics
notin helper function. Opposite of `in` function.%notin%
Add variable to R environment (in contrast to system environment).assign_to_R_env
Takes a data.table dataset and checks if for each unique element in a specified column there is exaclty one row.check_if_unique_rows
Clean paths to surely have a tailing slash or not.clean_path_name
Archives the current logfile and creates a new blank one.cleanup_old_logfile
Clean the console and environment-variables.clear
Unset/close all open connections.close_all_connections
Get the content of a data.table row in print-ready format.dt_row_to_string
Robust compare two elements and return true if both elements are the same. False otherwise. No `NA` or `NULL`.equals2
Function to feedback messages either to the user and/or to the console and to the logfile.feedback
Format the feedback stringfeedback_get_formatted_string
Print to the console. Internal use only.feedback_to_console
Add to the logfile. Internal use.feedback_to_logfile
Feedback to the gui/browser-console with logjs. Internal use.feedback_to_logjs
Feedback to the user with a modal. Internal use.feedback_to_ui
Read in lines from a file and store it in a list.file_lines_to_list
Converts the first letter of the input string to uppercase.firstup
Formats a given POSIXct timestamp without the need of manually specifing format parameters.format_posixct
Reads a config yaml file and return the value for a given key.get_config
Quickly get the current time stamp without the need to handle format-options etc.get_current_timestamp
Checks if a string matches a given date format.is_date_format
Check for empty/`NA`/`NULL`/`NaN`/etc. values.is.empty
Get the current settings for the logging function as list.log_get_current_options
Get the default settings for the logging function as list.log_get_default_options
Internal function for debugging only.log_internal_test
Get the logger type from the type string (the argument of the `feedback()` function)log_map_type_to_loggertype
Remove all log-related options from `options()`.log_remove_options
Set default options for all log-functionslog_set_defaults
Converts an integer number to its "verbal position". 1 -> "1st", 2 -> "2nd", 3 -> "3rd", 4 -> "4th", ...number_to_position
Get the percentage of two values pretty formatted.paste_pct_sum
Normal `paste` function with additional `collapse_last` argument.paste2
Quickly get a pretty timestamp without need to handle format-options etc.pretty_timestamp
Repeat something with the ability to also collapse the output.rep2
Round numbers without problems.robust_round
Get the difference of two vectors in both directions.setdiff_all
Set all variables of a `.env` file to the system environment.setenv_file
Assign variables to the system environment.setenv2
Clean string with a given set of replacements.string_replacements
Calculate time difference of two timestamps, round the value and return a string with suiting unit.time_diff_print
Trim Spaces of a string.trim.space
Vectorised string replacement.vgsub