getSQLiteFile: Download and unzip the most recent GEOmetadb SQLite file

Description Usage Arguments Value Author(s) Examples

View source: R/getSQLiteFile.R

Description

This function is the standard method for downloading and unzipping the most recent GEOmetadb SQLite file from the server. Note: size of the full GEOmetadb.sqlite.gz could be over 10GB and the demo database is 25MB (use type="demo")

Usage

1
getSQLiteFile(destdir = getwd(), destfile = "GEOmetadb.sqlite.gz", type = "normal")

Arguments

destdir

The destination directory of the downloaded file

destfile

The filename of the downloaded file. This filename should end in ".gz" as the unzipping assumes that is the case

type

type of GEOmetadb.sqlite to download, if it is 'normal', a full database will be downloaded, otherwise a demo database will be downloaded, which is 25MB.

Value

Prints some diagnostic information to the screen.

Returns the local filename for use later.

Author(s)

Sean Davis <sdavis2@mail.nih.gov>

Examples

1
2
3
4
5
6
7
8
9
## Download the demo GEOmetadb database:
if( !file.exists("GEOmetadb.sqlite") ) {
    demo_sqlfile <- getSQLiteFile(destdir = getwd(), destfile = "GEOmetadb.sqlite.gz", type = "demo")
} else {
    demo_sqlfile <- "GEOmetadb.sqlite"
}

## Download the full GEOmetadb database:
## Not run: geometadbfile <- getSQLiteFile()

GEOmetadb documentation built on Nov. 8, 2020, 7:19 p.m.