R/from_data_frame.R

Defines functions from_data_frame

Documented in from_data_frame

#' Convert a dataframe to a bedtools object
#' @param df A bedtools object that points to a file, and should have been generated by the bedtools command
#' @return  A bedtools object
#' @export
from_data_frame <- function(df){
    stopifnot(is.data.frame(df))
    location <- tmp_loc()
    suppressMessages(suppressWarnings(fwrite(df, location, col.names = F,
                                             row.names = F,sep = '\t', quote = F, scipen = 12)))
    return(bedtools_obj(location))
}
vinay-swamy/RBedtools documentation built on Feb. 19, 2020, 5:15 p.m.