Package: MazamaCoreUtils 0.6.2

Jonathan Callahan

MazamaCoreUtils: Utility Functions for Production R Code

A suite of utility functions providing functionality commonly needed for production level projects such as logging, error handling, cache management and date-time parsing. Functions for date-time parsing and formatting require that time zones be specified explicitly, avoiding a common source of error when working with environmental time series.

Authors:Jonathan Callahan [aut, cre], Eli Grosman [ctb], Spencer Pease [ctb], Thomas Bergamaschi [ctb]

MazamaCoreUtils_0.6.2.tar.gz
MazamaCoreUtils_0.6.2.zip(r-4.7)MazamaCoreUtils_0.6.2.zip(r-4.6)MazamaCoreUtils_0.6.2.zip(r-4.5)
MazamaCoreUtils_0.6.2.tgz(r-4.6-any)MazamaCoreUtils_0.6.2.tgz(r-4.5-any)
MazamaCoreUtils_0.6.2.tar.gz(r-4.7-any)MazamaCoreUtils_0.6.2.tar.gz(r-4.6-any)
MazamaCoreUtils_0.6.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
MazamaCoreUtils/json (API)

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

Bug tracker:https://github.com/mazamascience/mazamacoreutils/issues

On CRAN:

Conda:

8.03 score 4 stars 5 packages 111 scripts 576 downloads 49 exports 104 dependencies

Last updated from:2eb3698523. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK149
source / vignettesOK193
linux-release-x86_64OK135
macos-release-arm64OK74
macos-oldrel-arm64OK103
windows-develOK95
windows-releaseOK84
windows-oldrelOK85
wasm-releaseOK173

Exports:%>%checkcheck_fastcheck_fastercheck_fastestcheck_slowcheck_slowercheck_slowestcreateLocationIDcreateLocationMaskdateRangedateSequenceDEBUGERRORFATALgetAPIKeyhtml_getLinkNameshtml_getLinkshtml_getLinkUrlshtml_getTablehtml_getTablesINFOinitializeLogginglintFunctionArgs_dirlintFunctionArgs_fileloadDataFilelogger.debuglogger.errorlogger.fatallogger.infologger.isInitializedlogger.setLevellogger.setuplogger.tracelogger.warnmanageCacheparseDatetimesetAPIKeysetIfNullshowAPIKeysstopIfNullstopOnErrortimeRangetimeStamptimezoneLintRulesTRACEvalidateLonLatvalidateLonsLatsWARN

Dependencies:askpassbase64encbrewbriobslibcachemcallrclicliprcommonmarkcpp11crayoncredentialscurldescdevtoolsdiffobjdigestdownlitdplyrellipsisevaluatefansifastmapfontawesomefsgenericsgeohashToolsgertgitcredsgluehighrhtmltoolshtmlwidgetshttpuvhttrhttr2inijquerylibjsonliteknitrlaterlifecycleloggerlubridatemagrittrmemoisemimeminiUIopensslotelpakpillarpkgbuildpkgconfigpkgdownpkgloadpraiseprettyunitsprocessxprofvispromisespspurrrR6raggrappdirsrcmdcheckRcpprlangrmarkdownroxygen2rprojrootrstudioapirversionsrvestsassselectrsessioninfoshinysourcetoolsstringistringrsyssystemfontstestthattextshapingtibbletidyselecttimechangetinytexurlcheckerusethisutf8vctrswaldowhiskerwithrxfunxml2xopenxtableyamlzip

Logging
Logging in Java and Python | Logging in R | Log Levels | ERROR | WARN | INFO | DEBUG | TRACE | A Logging Example | ERROR.log | INFO.log | TRACE.log | Extra Functionality | logger.setLevel() | initializeLogging()

Last update: 2026-01-01
Started: 2018-12-02

Date Parsing
Environmental Time Series Data | Linting for timezones

Last update: 2026-01-01
Started: 2019-08-20

Cache Management
A Product Cache Example | Removing 'Stale' Products | Other Use Cases

Last update: 2024-12-03
Started: 2018-10-11

Error Handling
Error Handling in Java and Python | Error Handling in R | Simpler Error Handling in R | stopOnError() | Working example

Last update: 2022-08-10
Started: 2018-12-03

Readme and manuals

Help Manual

Help pageTopics
API keys for data servicesAPIKeys
Create one or more unique location IDscreateLocationID
Create a mask of valid locationscreateLocationMask
Create a POSIXct date rangedateRange
Create a POSIXct date sequencedateSequence
Get API keygetAPIKey
Extract links from an HTML pagehtml_getLinkNames html_getLinks html_getLinkUrls
Extract tables from an HTML pagehtml_getTable html_getTables
Initialize standard log filesinitializeLogging
Lint function calls for required named argumentslintFunctionArgs lintFunctionArgs_dir lintFunctionArgs_file
Load R data from a URL or local fileloadDataFile
Python-style logging statementslogger.debug
Python-style logging statementslogger.error
Python-style logging statementslogger.fatal
Python-style logging statementslogger.info
Check whether logging has been initializedlogger.isInitialized
Set console log levellogger.setLevel
Set up Python-style logginglogger.setup
Python-style logging statementslogger.trace
Python-style logging statementslogger.warn
Log levelsDEBUG ERROR FATAL INFO logLevels TRACE WARN
Manage cache sizemanageCache
Run package checkscheck check_fast check_faster check_fastest check_slow check_slower check_slowest packageCheck
Parse datetimesparseDatetime
Set API keysetAPIKey
Set a variable to a default value if it is NULLsetIfNull
Show API keysshowAPIKeys
Stop if an object is 'NULL'stopIfNull
Stop on try-errorstopOnError
Create a POSIXct time rangetimeRange
Create character timestampstimeStamp
Timezone linting rulestimezoneLintRules
Validate longitude and latitude valuesvalidateLonLat
Validate longitude and latitude vectorsvalidateLonsLats