handle_empty_data: Gracefully handle empty data

View source: R/matsindf_apply.R

handle_empty_dataR Documentation

Gracefully handle empty data

Description

When empty data are provided to matsindf_apply(), care must be take with the return value. This function assembles the correct zero-row data frame or zero-length lists.

Usage

handle_empty_data(.dat = NULL, FUN, DF, types)

Arguments

.dat

The .dat argument to matsindf_apply().

FUN

The FUN argument to matsindf_apply().

DF

The assembled DF inside matsindf_apply().

types

The types object assembled inside matsindf_apply().

Value

The appropriate return value from matsindf_apply(), either a zero-length list or a zero-row data frame.


matsindf documentation built on Aug. 18, 2023, 5:06 p.m.