loso: Lists of serialisable objects

losoR Documentation

Lists of serialisable objects

Description

This function creates objects of S3 class "loso", which are standard lists with this class attribute set. These objects can be used within SerialisableObject objects for fields that contain multiple objects which may themselves be serialisable. Otherwise their functionality is the same as a normal list.

Usage

loso(..., count = NA)

Arguments

...

List elements.

count

If only one element is provided, an optional integer specifying the number of times to repeat the element. This allows lists of a fixed size to be created using a default value.

Value

A list of class "loso".

Note

TractoR's serialisable objects are reference classes, and so naive use of rep to create a list of object copies will have reference semantics whereby each object refers to the same set of fields, which is rarely the intention. This function explicitly creates a deep copy for each replicate to avoid this.

Author(s)

Jon Clayden

References

Please cite the following reference when using TractoR in your work:

J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v044.i08")}.

See Also

SerialisableObject, save, load, writeImageFile.


tractor.base documentation built on Nov. 5, 2025, 6:18 p.m.