trExport {TinnR}R Documentation

Export the content of an object in a foreign format

Description

trExport is a generic function (S3 based) to convert objects into various foreign formats and write it to a file or a connection.

Usage

  trExport(x, ...)
  ## Default S3 method:
  trExport(x, type="raw", file, append=FALSE,
    objname=deparse(substitute(x)), ...)
  ## S3 method for class 'data.frame':
  trExport(x, type="raw", file=NULL, append=FALSE,
    objname=deparse(substitute(x)), ...)
  ## S3 method for class 'matrix':
  trExport(x, type="raw", file, append=FALSE,
    objname=deparse(substitute(x)), ...)

Arguments

x The object to trExport.
type type gives the format in which the object should be converted. The list of recognized formats for this object is obtained with type="typelist".
file The path to the file where the converted object should be extracted.
append Do we append this object to this file?
objname The name of the object (by default, it is the name of the variable that holds it).
... Further argument passed to specific trExport methods.

Value

Return the result from specif trExportation methods (invisibly if the file is written).

Author(s)

Adaptations: Jose Claudio Faria joseclaudio.faria@gmail.com
Original author: Philippe Grosjean phgrosjean@sciviews.org

See Also

copy, trCopy

Examples

  ## Not run: 
    data(iris)
    trExport(iris, type="ascii", file="iris.txt")
    # Inspect the file 'iris.txt', and then...
    unlink("iris.txt")
  
## End(Not run)

[Package TinnR version 1.0.3 Index]