Learn R Programming

⚠️There's a newer version (0.5.3) of this package.Take me there.

MazamaCoreUtils

A suite of utility functions providing functionality commonly
needed for production level projects such as logging, error handling,
cache management and date parsing.

Background

The MazamaCoreUtils package was created by MazamaScience to regularize our work building R packages and R-based web services.

The main goal of this package is to create an internally standardized set of functions that we can use in various systems that are being run operationally. Areas of functionality supported by this package include:

  • python style logging

  • simple error messaging

  • cache management

  • date parsing

  • source code linting

Installation

Install from CRAN with:

install.packages('MazamaCoreUtils')

Install the latest version from GitHub with:

devtools::install_github('mazamascience/MazamaCoreUtils')


This project is supported by Mazama Science.

Copy Link

Version

Install

install.packages('MazamaCoreUtils')

Monthly Downloads

495

Version

0.4.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jonathan Callahan

Last Published

January 8th, 2020

Functions in MazamaCoreUtils (0.4.2)

dateSequence

Create a POSIXct date sequence
lintFunctionArgs

Lint a source file's function arguments
initializeLogging

Initialize standard log files
flog.logger

Manage loggers
logger.warn

Python-style logging statements
logger.trace

Python-style logging statements
loadDataFile

Load data from URL or local file
logger.setLevel

Set console log level
logger.debug

Python-style logging statements
logger.setup

Set up python-style logging
logger.error

Python-style logging statements
logLevels

Log levels
stopIfNull

Stop if an object is NULL
stopOnError

Error message translator
logger.info

Python-style logging statements
manageCache

Manage the size of a cache
logger.fatal

Python-style logging statements
parseDatetime

Parse datetime strings
%>%

Pipe operator
tidyeval-data

Data pronoun for tidy evaluation
setIfNull

Set a variable to a default value if it is NULL
logger.isInitialized

Check for initialization loggers
timeStamp

Character representation of a POSIXct
timeRange

Create a POSIXct time range
timezoneLintRules

Rules for timezone linting.
MazamaCoreUtils

Utility Functions for Production R Code
check_slower

Check and run donttest and dontrun examples
check_slow

Check and run donttest examples
check_fastest

Package check without building vignettes, examples or tests
dateRange

Create a POSIXct date range
check_fast

Package check without building vignettes
check_faster

Package check without building vignettes or examples
check

Package check
check_slowest

Check and run donttest and dontrun examples, max testing