Learn R Programming

GenomicTools.fileHandler (version 0.1.5.9)

importBed: Importing a Bed File.

Description

This function imports a standard bed file

Usage

importBed(file, header = FALSE, sep = "\t")

Arguments

file

Specifies the filename/path

header

Logical, is a header present

sep

Column separator

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. However, if no header lines is given, this function automatically assigns the column names, as they are given in the bed-specification on the Ensembl page here: https://www.ensembl.org/info/website/upload/bed.html

See Also

[exportBed], [read.table]

Examples

Run this code
# NOT RUN {
   
 # Define here the location on HDD for the example file
   fpath <- system.file("extdata","example.bed", package="GenomicTools.fileHandler")
 # Import the example bed file  
   bedFile <- importBed(file=fpath)
 
# }

Run the code above in your browser using DataLab