inst/unitTests/saveas_test.R

test_saveas <- function() { 
  x <- 1:10
  path <- tempdir()
  saveas(x, "myx", path)
  newfile <- file.path(path, "myx.RData")
  checkTrue(file.exists(newfile))
  load(newfile)
  checkTrue("myx" %in% objects())
  unlink(newfile)
  
  saveas(x, "myx.Rdata", path)
  newfile <- file.path(path, "myx.Rdata")
  checkTrue(file.exists(newfile))
  unlink(newfile)
  
  saveas(x, "myx.rda", path)
  newfile <- file.path(path, "myx.rda")
  checkTrue(file.exists(newfile))
  unlink(newfile)
}

Try the GWASTools package in your browser

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

GWASTools documentation built on Nov. 8, 2020, 7:49 p.m.