Description Usage Arguments Details Value Author(s) See Also Examples
A wrapper function to import a directory of cyphergenXML files into a SQLite database.
1 2 3 |
xmldir |
A character specifying the directory that holds xml files. |
dbname |
A character specifying the full name of a SQLite database file, including path. |
tablename |
A |
tof |
A logical determining whether reading in TOF or processed data. |
maxRows |
An integer specifying the largest number of rows that a intermediate binary file can hold. |
maxCols |
An integer specifying the largest number of columns
that the resulting SQLite table can hold. Or a |
tmpdir |
A character specifying the name of the temporary directory to store binary files. |
splitSubdir |
A logical. If |
verbose |
A logical or non-negative integer specifying the extend of extra messages to be printed out. |
... |
Additional optional arguments. |
This function will import all cyphergenXML files under a certain directory (including
subdirectory) into a SQLite database. Each XML file contains one mass spectra.
XML files can be grouped into subdirectories so that each group of XML files will
go into the same SQLite table. Otherwise all XML files are treated as the same
group. SQLite Tables should not contain too many columns.
Therefore a limit is given by maxCols
. If the number of XML files in a group
is too large, we split the XML files evenly into multiple tables.
maxRows
determined the size of intermediate binary files. If it is too large,
the intermediate file might be out of memory and could not be read in.
It returns a logical indicating whether the importing was successful or not.
Y Alex Chen
importBin2Sqlite, cypherGenXMList2BinBlocks
1 2 3 4 5 6 7 8 9 | ## Not run:
xmldir <- "E:\SQLData\UPCI-2007-06\UPCI AUG WCX"
dbname <- "e:\mydatabase1.db"
system.time(p<-importXMLDir(xmldir, dbname, tof=FALSE, split=FALSE,
maxRows=5000, tablename="nocattable", verbose=3))
conn <- dbConnect("SQLite", "e:/mydatabase1.db", cache.size=100000)
dbListTables(conn)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.