CoxpresDbAccessor: Constructor for the CoxpresDbAccessor class - Use this to...

Description Usage Arguments Details Value

View source: R/coxpresdbr_io.R

Description

The db_archive should be a data-frame, a .zip, .tar or a .tar.bz2.

Usage

1
2
CoxpresDbAccessor(db_archive, temp_dir = tempdir(),
  overwrite_in_bunzip2 = FALSE, remove_in_bunzip2 = FALSE)

Arguments

db_archive

Either a data-frame or a file path. If a file-path, it should be a single `*`.tar.bz2, `*`.tar, or `*`.zip file as downloaded from the _coxpresdb.jp_ website. If a data-frame it should have columns source_id, target_id and mutual_rank.

temp_dir

A directory into which a compressed CoxpresDB archive will be decompressed. By default this is the temp_dir for the current R session. Only relevant if the coxpresdb archive is compressed.

overwrite_in_bunzip2

Boolean. If the CoxpresDB archive is compressed, and a decompressed copy of the archive is found in the target directory, should the function throw an exception? See overwrite in R.utils::bunzip2

remove_in_bunzip2

Boolean. If a compressed CoxpresDB archive is provided, should the compressed version be deleted after decompression? See remove in R.utils::bunzip2

Details

If db_archive is a .tar.bz2 then temp_dir should be defined and a random copy of the uncompressed archive will be made. All access to the stored data will be made via the uncompressed copy of the archive, so make a CoxpresDbAccessor _once_ during any given script.

Data-frame access is the fastest approach (but works 'in memory'). Access via an archive is useful if you want to set up a reduced-size coxpresDB file for subsequent 'in-memory' use in your analysis workflow.

Value

A CoxpresDbAccessor object.


russHyde/coxpresdbr documentation built on Dec. 24, 2019, 11:59 a.m.