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

502

Version

0.4.3

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jonathan Callahan

Last Published

April 8th, 2020

Functions in MazamaCoreUtils (0.4.3)

MazamaCoreUtils

Utility Functions for Production R Code
dateRange

Create a POSIXct date range
loadDataFile

Load data from URL or local file
logger.isInitialized

Check for initialization loggers
logger.setLevel

Set console log level
dateSequence

Create a POSIXct date sequence
logger.debug

Python-style logging statements
logger.error

Python-style logging statements
logLevels

Log levels
logger.warn

Python-style logging statements
manageCache

Manage the size of a cache
flog.logger

Manage loggers
stopIfNull

Stop if an object is NULL
initializeLogging

Initialize standard log files
logger.fatal

Python-style logging statements
setIfNull

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

Python-style logging statements
stopOnError

Error message translator
%>%

Pipe operator
packageCheck

Run package checks
lintFunctionArgs

Lint a source file's function arguments
parseDatetime

Parse datetime strings
timeRange

Create a POSIXct time range
logger.setup

Set up python-style logging
logger.trace

Python-style logging statements
timeStamp

Character representation of a POSIXct
tidyeval-data

Data pronoun for tidy evaluation
timezoneLintRules

Rules for timezone linting.