tests/testthat/test-pitch-to-df.R

test_that("pitch_to_df", {
  file1 <- system.file("extdata", "test.Pitch", package = "phonfieldwork")
  file2 <- readLines(file1)

  expect_equal(nrow(pitch_to_df(file1)), 62)
  expect_equal(nrow(pitch_to_df(file2)), 62)
  expect_equal(nrow(pitch_to_df(file1, candidates = "all")), 426)
})

Try the phonfieldwork package in your browser

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

phonfieldwork documentation built on March 3, 2021, 1:12 a.m.