Learn R Programming

biofiles (version 1.0.0)

saveRecord: Save and load gbRecord objects.

Description

Serialise and unserialise '>gbRecords using saveRDS and readRDS

Usage

saveRecord(x, file = NULL, dir = ".", ...)

# S4 method for gbRecord saveRecord(x, file = NULL, dir = ".", ...)

# S4 method for gbRecordList saveRecord(x, file = NULL, dir = ".", ...)

loadRecord(file, ...)

Arguments

x

A '>gbRecord or '>gbRecordList instance.

file

A character string naming the file to write to or read from. If NULL, the accession number will be used to construct a file name.

dir

Target directory. (Default: current working directory)

...

Arguments passed to saveRDS.

Examples

Run this code
# NOT RUN {
aca <- genomeRecordFromNCBI("Bacteria/Acaryochloris_marina", verbose = TRUE)
aca
saveRecord(aca)
rm(aca)
aca <- loadRecord("./NC_009925_NC_009926_NC_009927_NC_009928_NC_009929_NC_0099__.rds")
aca
# }

Run the code above in your browser using DataLab