tests/testthat/test-setupSurvey.R

library(locaR)
context("Set up survey")

test_that("Survey creation.", {
  #Without recursive search.
  s <- setupSurvey(folder = tempdir(),
                   projectName = 'Ex',
                   run = 1,
                   coordinatesFile = system.file('extdata',"Vignette_Coordinates.csv", package = 'locaR'),
                   siteWavsFolder = system.file('extdata', package = 'locaR'),
                   date = 20200617,
                   time = 90000,
                   surveyLength = 180)
  expect_is(s, 'data.frame')
  #Recursive search through folders.
  s <- setupSurvey(folder = tempdir(),
                   projectName = 'Ex',
                   run = 1,
                   coordinatesFile = system.file('extdata',"Vignette_Coordinates.csv", package = 'locaR'),
                   siteWavsFolder = system.file(package = 'locaR'),
                   date = 20200617,
                   time = 90000,
                   surveyLength = 180)
  expect_is(s, 'data.frame')
}
)

Try the locaR package in your browser

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

locaR documentation built on Feb. 16, 2023, 10:28 p.m.