dbimportBin2Sqlite: Import binary file into SQL

Description Usage Arguments Details Value Note Author(s) See Also

Description

Functions to import binary files into one or multiple SQL tables. binblocks2SQLite reads a series of binary files into a single table. importBin2Sqlite is an extension to binB2SQLite in order to read a series of binary files into multiple SQLite tables.

Usage

1
2
3
4
binblocks2SQLite(conn, path, tablename, columnID, pattern, what = "double", 
  append = FALSE, verbose = TRUE, ...)
importBin2Sqlite(conn, path, tablename, sampleTable, what = "double", categoryTable = NULL, 
  prefix = "", verbose = 1, ...)

Arguments

conn

Either a connection object or a character.

path

A character defining

tablename

A character string specifying the SQL table name.

columnID

A vector of characters specifying the column names.

pattern

A character string specifying patterns in file names.

what

A character to specifying the data type in the binary file. It is possible that a binary file might contain several types of data, but we don't support that currently.

append

A logical value. If FALSE, then existing tables will be overwritten. Otherwise, data will be appended onto the existing table.

verbose

A logical value or non-negative integer to control whether or not to print out extra information.

sampleTable

A data frame containing three fields: sampleID, tableID and pattern.

categoryTable

A data frame containing categorical information.

prefix

A character string specifying optional prefix on table names.

...

Additional optional arguments.

Details

binB2SQLite reads a series of binary files with names sharing pattern pattern into a single SQLite table name on database conn.

importBin2Sqlite requires a data frame, (sampleTable) that contains table topology, i.e. what table contains what columns, and what table contains what kind of binary files. The sampleTable will be imported to SQL database conn in additon to all binary files. If an optional data frame category is specified, it will also be imported into SQLite. In that case, users can use SQL JOIN to get category related data.

Value

Both functions return a logical indicating whether the importing was successful or not.

Note

Users must make sure that all binary files share the same dimensionality.

Author(s)

Y Alex Chen <ychen@insightful.com>

See Also

readBin, readBinMatrix, writeBinBlocks


zeehio/msProcess documentation built on May 4, 2019, 10:15 p.m.