systemdf: Wrapper of system calls in which input and output are all...

Description Usage Arguments Details Value Examples

Description

Wrapper of system calls in which input and output are all table-like files

Usage

1
systemdf(cmd, envir = parent.frame(), verbose = FALSE)

Arguments

cmd

shell command

envir

environment where to look for variables encoded in cmd

verbose

whether print messages

Details

This function (system + data frame) provides a convinient way to invoke system calls in R. Since most of system calls expect tables as input and output, systemdf does following things step by step:

A simple example is as follows:

1
2
3
    bed1 = circlize::generateRandomBed(nr = 1000)
    bed2 = circlize::generateRandomBed(nr = 1000)
    df = systemdf("bedtools closest -a `bed1` -b `bed2` | awk '$1==\"chr1\"'")  

Value

A data frame. If there is no line generated by the system call, the returned value is a three-column data frame with 0 row.

Examples

1
2
# There is no example
NULL

jokergoo/cotools documentation built on May 19, 2019, 6:24 p.m.