Skip to content

Latest commit

 

History

History
88 lines (68 loc) · 3.87 KB

README.md

File metadata and controls

88 lines (68 loc) · 3.87 KB

helfRlein - 1.5.0

branch master dev
R CMD check master-branch dev-branch
test coverage master-test-coverage dev-test-coverage
lints master-lints dev-lints

Overview

This package contains a collection of R helper functions. There are two main topics:

  • general helper functions that ease our programing life
  • functions that ease our daily work and projects

With version 1.0.0. stand alone functions like burglr and dive have been removed. See the NEWS for more details.

Installation

# install.packages("devtools")
devtools::install_github("STATWORX/helfRlein")

# installing the dev version
devtools::install_github("STATWORX/helfRlein", ref = "dev")

List of functions

general helper functions

  • char_replace() A function that replaces special characters within strings.
  • checkdir() Combines file.exists() and dir.create().
  • clean_gc() A function that calls gc() numerous times.
  • count_na() A functions that returns the number of missing values.
  • evenstrings() This function reduces and cuts a given string into parts with a fixed length.
  • get_sequence() A function that returns start and end indices that indicates where a given pattern occurs.
  • intersect2() This function returns the intersect between multiple vectors.
  • multiplot() A function to combine different ggplots into one plot.
  • na_omitlist() A function to remove missing values from a list.
  • %nin% A not in operator.
  • read_files() Reads in a list of files and combines them into one data.table.
  • save_rds_archive() Archives existing identically named .RDS files (with a time stamp) instead of silently overwriting them.
  • statusbar() A progress bar for for-loops.
  • strsplit() This functions adds the possibility to keep the delimiter after, before or between a given split.
  • to_na() Takes out NaN and Inf values and replaces them with NA.
  • trim() Removes leading and / or trailing whitespaces.

project functions

  • get_files() A functions for finding patterns in R Files.
  • get_network() A function that visualises the connections between UDF within your project. You can find a detailed introduction to this function here.
  • object_size_in_env() Lists all objects with their size in a given environment.
  • print_fs() This function prints the folder and file structure of a given path.
  • sci_palette() A functions that shows STATWORX's CI colours.
  • set_new_chapter() An addin to insert dashes from the courser position up to 80 characters.
  • statworx_palette() This functions creates a colour palette based on our CI colours.