Learn R Programming

SciViews (version 0.8-8)

export: Export the content of an object in a foreign format

Description

export is a generic function to convert objects into various foreign formats and write it to a file or a connection.

Usage

export(x, type = "raw", file, append = FALSE, objname = deparse(substitute(x)), ...)

Arguments

x
The object to export
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 export methods

Value

  • Return the result from specif exportation methods (invisibly if the file is written)

synopsis

export(x, type = "raw", file, append = FALSE, objname = deparse(substitute(x)), ...) export.default(x, type = "raw", file, append = FALSE, objname = deparse(substitute(x)), ...) export.data.frame(x, type = "raw", file = NULL, append = FALSE, objname = deparse(substitute(x)), saslib = "work", sasmember = "", writeit = TRUE, ...) export.matrix(x, type = "raw", file, append = FALSE, objname = deparse(substitute(x)), ...)

See Also

copy

Examples

Run this code
data(iris)
        export(iris, type = "ascii", file = "iris.txt")
        # Inspect the file 'iris.txt', and then...
        unlink("iris.txt")

Run the code above in your browser using DataLab