repSave | R Documentation |
The repSave
function is deigned to save your data to the disk
in desirable format. Currently supports "immunarch" and "vdjtools" file formats.
repSave(.data, .path, .format = c("immunarch", "vdjtools"), .compress = TRUE)
.data |
An R dataframe, a list of R dataframes or a list with |
.path |
A string with the path to the output directory. It should include file name if a single dataframe is provided to .data argument. |
.format |
A string with desirable format specification. Current options are "immunarch" and "vdjtools". |
.compress |
A boolean value. Defines whether the output will be compressed or not. |
It is not necessary to create directories beforehand. If the provided directory does not exist it will be created automatically.
No return value.
data(immdata)
# Reduce data to save time on examples
immdata$data <- purrr::map(immdata$data, ~ .x %>% head(10))
dirpath <- tempdir()
# Save the list of repertoires
repSave(immdata, dirpath)
# Load it and check if it is the same
new_immdata <- repLoad(dirpath)
# sum(immdata$data[[1]] != new_immdata$data[[1]], na.rm = TRUE)
# sum(immdata$data[[2]] != new_immdata$data[[2]], na.rm = TRUE)
# sum(immdata$meta != new_immdata$meta, na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.