R/write_tfl.R

write.tfl <- function (tfl, file, encoding=getOption("encoding"))
{
  if (! inherits(tfl, "tfl")) stop("'tfl' argument must be of class 'tfl'")
  if ( (length(file) != 1) || (! is.character(file)) )
    stop("'file' argument must be a single character string")
  if (attr(tfl, "incomplete"))
    warning("saving incomplete type frequency list, which cannot be restored from disk file!")
  
  write.table(tfl, file=auto.gzfile(file, encoding=encoding), quote=FALSE, sep="\t", row.names=FALSE, col.names=TRUE)
}

Try the zipfR package in your browser

Any scripts or data that you put into this service are public.

zipfR documentation built on Jan. 8, 2021, 2:37 a.m.