ensure_data.table: Ensure that an object is a 'data.table'

View source: R/check-input-helpers.R

ensure_data.tableR Documentation

Ensure that an object is a data.table

Description

This function ensures that an object is a ⁠data table⁠. If the object is not a data table, it is converted to one. If the object is a data table, a copy of the object is returned.

Usage

ensure_data.table(data)

Arguments

data

An object to ensure is a data table.

Value

A data.table/a copy of an existing data.table.


epiforecasts/scoringutils documentation built on Dec. 11, 2024, 11:12 a.m.