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

448

Version

0.4.4

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Jonathan Callahan

Last Published

July 20th, 2020

Functions in MazamaCoreUtils (0.4.4)

logger.fatal

Python-style logging statements
logger.info

Python-style logging statements
timeRange

Create a POSIXct time range
flog.logger

Manage loggers
dateSequence

Create a POSIXct date sequence
setIfNull

Set a variable to a default value if it is NULL
tidyeval-data

Data pronoun for tidy evaluation
%>%

Pipe operator
logger.trace

Python-style logging statements
logger.setup

Set up python-style logging
lintFunctionArgs

Lint a source file's function arguments
initializeLogging

Initialize standard log files
logger.warn

Python-style logging statements
html_getLinks

Find all links in an html page
loadDataFile

Load data from URL or local file
logLevels

Log levels
logger.setLevel

Set console log level
stopIfNull

Stop if an object is NULL
logger.isInitialized

Check for initialization loggers
logger.debug

Python-style logging statements
html_getTables

Find all tables in an html page
manageCache

Manage the size of a cache
timeStamp

Character representation of a POSIXct
timezoneLintRules

Rules for timezone linting.
stopOnError

Error message translator
logger.error

Python-style logging statements
parseDatetime

Parse datetime strings
packageCheck

Run package checks
dateRange

Create a POSIXct date range
MazamaCoreUtils

Utility Functions for Production R Code