tests/testthat/test_F_PointsNocovsExpansions.R

data(thrasherDetectionData)

# The set of parameters to test
testInputs <- expand.grid(
  likelihood = c( "halfnorm", "hazrate", "negexp", "logistic" ),
  pointSurvey = c(TRUE),
  w.lo = c(0), 
  w.hi = c(NA), 
  expansions = 0:3,
  series = c('simple', 'cosine', 'hermite'),
  x.scl = c(0),
  g.x.scl = c(1), 
  observer = "both",
  outputUnits = c("m"), 
  stringsAsFactors = FALSE
)

abundParams <- expand.grid(
  area = units::set_units(c(100), "m^2"), 
  ci = c(NA),
  R = 20,
  bySite = FALSE,
  plot.bs = TRUE,
  showProgress = FALSE
)

Sys.setenv('TESTTHAT_MAX_FAILS' = Inf)

res <- test_dfuncEstim( detectParams = testInputs,
                        abundParams = abundParams,
                        detectDf = thrasherDetectionData, 
                        abundDf = thrasherSiteData,
                        formula = dist ~ 1 )
tmcd82070/Rdistance documentation built on April 10, 2024, 10:20 p.m.