tests/testthat/test-ReadSpecClipboard.R

testthat::test_that(
	desc = "ReadSpecClipboard works as expected", 
	code = {
	  fn <- tempfile(fileext = ".txt")
    x <- as.matrix(InterpretMSSpectrum::apci_spectrum)
    rownames(x) <- 1:nrow(x)
    write.table(x = x, file = fn, row.names = FALSE)
    testthat::expect_equal(InterpretMSSpectrum::ReadSpecClipboard(con = fn), x)
	}
)

Try the InterpretMSSpectrum package in your browser

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

InterpretMSSpectrum documentation built on May 29, 2024, 10:18 a.m.