clone a GatingSet

clone(x, ...)

gs_clone(x, h5_dir = tempdir())

gs_copy_tree_only(x)

Arguments

x

A GatingSet

...

h5_dir = tempdir() the directory to store the h5-based flow data matrix

h5_dir

h5 dir for the new gs

Value

A copy of a given GatingSet.

Details

Note that the regular R assignment operation on a GatingSet object does not return the copy as one would normally expect because the GatingSet contains environment slots (and external pointer for GatingSet), which require deep-copying. So make sure to use this clone method in order to make a copy of existing object.

Examples

if (FALSE) { #gs is a GatingSet gs2 <-gs_clone(gs) #gs2 is independent from gs and have its own copy of both gating trees and flow data gs3 <- gs_copy_tree_only(gs) #gs3 has its own copy of gating trees but share the same flow data with original gs }