copybig: Decide if large objects should be copied

View source: R/misc.R

copybigR Documentation

Decide if large objects should be copied

Description

Decide if large objects should be copied

Usage

copybig(x, .copy = NA)

Arguments

x

object (potentially of large size)

.copy

Should the object be copied internally by data.table::copy()? NA (by default) means that objects smaller than 1 GB are copied. If the size is larger, the argument must be set explicitly. Set TRUE to make copies regardless of object size. This is recommended if enough RAM is available. If set to FALSE, calculations might be carried out but the object will be changed by reference. IMPORTANT! This might lead to undesired consequences and should only be used if absolutely necessary!

Value

Either x unchanged, or a fresh copy of x.


eribul/coder documentation built on March 16, 2023, 12:50 a.m.