#' 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))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.