copy_cesa: Create an independent copy of a CESAnalysis

View source: R/CESAnalysis.R

copy_cesaR Documentation

Create an independent copy of a CESAnalysis

Description

Used internally to "copy" CESAnalysis objects while keeping memory use to a minimum.

Usage

copy_cesa(cesa)

Arguments

cesa

CESAnalysis

Details

The trick is to use data.table's copy function on all data.tables (and lists of data.tables) within CESAnalysis slots. (If you just call copy on the whole object, the data tables won't be handled in a memory-efficient way. And if you call copy on non-data.tables, it's actually less efficient since it forces an immediate full copy instead of the usual copy-on-modify.)


Townsend-Lab-Yale/cancereffectsizeR documentation built on April 28, 2024, 6:14 p.m.