save_nl_in_parts {nat.utils} | R Documentation |
Save a neuronlist object into separate data and metadata parts
Description
Save a neuronlist object into separate data and metadata parts
Usage
save_nl_in_parts(
x,
datapath = NULL,
dfpath = NULL,
extdata = TRUE,
format = c("rds", "rda"),
...
)
Arguments
x |
A neuronlist object to save in separate parts |
datapath |
Optional path to new data file (constructed from name of
|
dfpath |
Optional path to new metadata file (constructed from
|
extdata |
Logical indicating whether the files should be saved into
extdata folder (default |
format |
Either |
... |
Additional arguments passed to |
Details
Saves a neuronlist into separate data and metadata parts. This can
significantly mitigate git repository bloat since only the metadata object
will change when any metadata is updated. By default the objects will be
saved into the package inst/extdata
folder with sensible names based
on the incoming object. E.g. if x=mypns
the files will be
mypns.rds
mypns.df.rds
Value
character vector with path to the saved files (returned invisibly)
See Also
Other extdata:
find_extdata()
,
read_nl_from_parts()
Examples
## Not run:
save_nl_in_parts(pns)
# which would make:
# - inst/extdata/pns.rds
# - inst/extdata/pns.df.rds
save_nl_in_parts(pns, format='rda')
# which would make:
# - inst/extdata/pns.rda
# - inst/extdata/pns.df.rda
save_nl_in_parts(pns, 'mypns.rda')
# which would make (NB format argument wins):
# - inst/extdata/mypns.rds
# - inst/extdata/mypns.df.rds
## End(Not run)