Learn R Programming

hoardeR (version 0.9.2)

importBed: Importing a Bed File.

Description

This function imports a standard bed file.

Usage

importBed(file, header=FALSE)

Arguments

file

Specifies the filename/path.

header

Logical, is a header present.

Value

A data.frame.

Details

This function imports a standard bed-file into a data.frame. It is basically a convenience wrapper around read.table.

See Also

exportBed, read.table

Examples

Run this code
# NOT RUN {
novelBed <- data.frame(Chr=c(11,18,3),
                         Start=c(72554673, 62550696, 18148822),
                         End=c(72555273, 62551296, 18149422),
                         Gene=c("LOC1", "LOC2", "LOC3"))

exportBed(novelBed, file="myLocs.bed")

novelBed.imp <- importBed(file="myLocs.bed")
# }

Run the code above in your browser using DataLab