tests/testthat/test_format_tsv.R

context("TSV imports/exports")
require("datasets")

test_that("Export to TSV", {
    expect_true(export(iris, "iris.tsv") %in% dir())
})

test_that("Import from TSV", {
    expect_true(is.data.frame(import("iris.tsv")))
})

unlink("iris.tsv")

Try the rio package in your browser

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

rio documentation built on Nov. 22, 2021, 9:07 a.m.