R/open_table.R

open_table <- function(r){

  # Create tempfile
  tmp <- tempfile()

  # Open Raw Connection to r's content
  httr::content(r, type = 'raw') %>%
    readr::write_file(tmp)

  read.delim(tmp, fileEncoding = "UTF-16LE", sep = "\t", header = T, stringsAsFactors = F)
}
azeloc/brcrimR documentation built on May 8, 2019, 11:43 a.m.