Learn R Programming

hoardeR (version 0.9.2)

exportBed: Exporting a Bed File.

Description

This function exports a standard bed file.

Usage

exportBed(x, file=NULL, header=FALSE)

Arguments

x

A data.frame

file

Specifies the filename/path.

header

Logical, shall a header be written.

Value

A bed file.

Details

This function exports a data.frame to a standard bed file. If no file name is given, the variable name will be used instead.

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")
exportBed(novelBed, file="myLocs_wHeader.bed", header=TRUE)
# }

Run the code above in your browser using DataLab