import {rtracklayer}R Documentation

Importing objects

Description

Imports an object from a connection according to a specified format.

Usage

import(con, format, text, ...)

Arguments

con

The connection through which the data is received. If this is a character vector, it is assumed to be a filename.

format

The format in which to expect the input. If omitted and con is a filename, the format is taken from the file extension.

text

If con is missing, this can be a character vector directly providing the string data to import.

...

Arguments to pass to the format-specific import routines.

Details

This function delegates to a format-specific function named according to the scheme import.format where format is specified by the format parameter.

Value

The object parsed from the connection or text.

Author(s)

Michael Lawrence

See Also

export to do the reverse.

Examples

  track <- import(system.file("tests", "bed.wig", package = "rtracklayer"))
  track <- import(system.file("tests", "v1.gff", package = "rtracklayer"), version = "1")
  # or
  track <- import(system.file("tests", "v1.gff", package = "rtracklayer"), "gff1")

[Package rtracklayer version 1.14.1 Index]