tests/testthat/test_format_fortran.R

context("Fortran imports/exports")

test_that("Import from Fortran", {
    ff <- tempfile()
    cat(file = ff, "123456", "987654", sep = "\n")
    expect_true(inherits(import(ff, format = "fortran", style = c("F2.1","F2.0","I2")), "data.frame"))
    unlink(ff)
})

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.