tests/testthat/test_format_csv_gz.R

context(".csv.gz imports/exports")
require("datasets")

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

test_that("Import from csv.gz", {
    expect_true(inherits(import("iris.csv.gz"), "data.frame"))
})

unlink("iris.csv.gz")

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.