Skip to contents

Appends fun to the internal data-loader registry (session$state$data_loaders). Registered functions are intended to be run sequentially in registration order.

Usage

add_data_loader(fun, session = NULL)

Arguments

fun

A function to register. Must take no arguments.

session

Optional fundsr_session object. Defaults to the package default session when NULL.

Value

Invisibly returns the updated session$state$data_loaders list.

Details

If a loader with the same function body is already registered, fun is not added again.

Examples

add_data_loader(function() NULL)