| readBaseFile {aroma.Base} | R Documentation |
Low-level function to read a BASE file (stream) from a connection or a file.
## Default S3 method: readBaseFile(con, ..., verbose=FALSE)
con |
A connection or a character string filename. |
... |
Arguments such as the important extractSpotsData,
passed to readBaseFileSection(). |
verbose |
Either a logical, a numeric, or a Verbose
object specifying how much verbose/debug information is written to
standard output. If a Verbose object, how detailed the information is
is specified by the threshold level of the object. If a numeric, the
value is used to set the threshold of a new Verbose object. If TRUE,
the threshold is set to -1 (minimal). If FALSE, no output is written
(and neither is the R.utils package required).
|
Returns a named list structure containing the parsed BASE structure.
The names of the elements in the list are the same as the names (types)
of the sections as given by section header 'section'.
Henrik Bengtsson (http://www.braju.com/R/)
[1] BASE - BioArray Software Environment,
http://base.thep.lu.se/
[2] Carl Troein, How to write a plugin for BASE, April 2003.
http://base.thep.lu.se/documentation/development/plugins.txt
http://opensource.microarray.omrf.org/wiki/bin/view/BASE/PluginWritingHowto
writeBaseFile().
readBaseFileSection().
See stdin() in showConnections to read from standard input.
# Read a simple BASE file structure (adopted from [2])
filename <- system.file("data-ex", "baseExample.base", package="aroma.Base")
base <- readBaseFile(filename)
print(base)
# Write it back to file
tmpfile <- tempfile()
writeBaseFile(tmpfile, base)
# Read the newly create file
base2 <- readBaseFile(tmpfile)
file.remove(tmpfile)
# Compare with the original structure
stopifnot(equals(base, base2))