export {rtracklayer} | R Documentation |
Exports (serializes) an object in a given format to a given connection.
export(object, con, format, ...)
object |
The object to export. |
con |
The connection to which the object is exported. If this is a character vector, it is assumed to be a filename and a corresponding file connection is created and then closed after exporting the object. If missing, the function will return the output as a character vector, rather than writing to a connection. |
format |
The format of the output. If missing and |
... |
Parameters to pass to the format-specific export routine. |
This function delegates to another function, depending on the
specified format. The name of the delegate is of the form
export.format
where format
is specified by the
format
argument.
If con
is missing, a character vector containing the string
output. Otherwise, nothing is returned.
Michael Lawrence
import
for the reverse
track <- import(system.file("tests", "v1.gff", package = "rtracklayer")) ## Not run: export(track, "my.gff", version = "3") ## equivalently, ## Not run: export(track, "my.gff3") ## or ## Not run: con <- file("my.gff3") export(track, con, "gff3") close(con) ## End(Not run) ## or as a string export(track, format = "gff3")