Skip to content

Commit

Permalink
Merge branch 'mcds-dot-exe' of https://github.com/DistanceDevelopment…
Browse files Browse the repository at this point in the history
…/Distance into mcds-dot-exe
  • Loading branch information
LHMarshall committed Mar 21, 2023
2 parents 835428e + 5dc22f9 commit dd551b8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Description: A simple way of fitting detection functions to distance sampling
Horvitz-Thompson-like estimator) if survey area information is provided. See
Miller et al. (2019) <doi:10.18637/jss.v089.i01> for more information on
methods and <https://examples.distancesampling.org/> for example analyses.
Version: 1.0.6.9005
Version: 1.0.7.9001
URL: https://github.com/DistanceDevelopment/Distance/
BugReports: https://github.com/DistanceDevelopment/Distance/issues
Language: en-GB
Expand Down
6 changes: 5 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
Distance 1.0.8
----------------------

* Support for using MCDS.exe from Distance for Windows to run analyses. You can now download MCDS.exe using mrds::download_MCDS_dot_exe run analyses using this engine, rather (or in tandem with) the usual R optimizers provided in mrds. ds will pick the best (by likelihood) and return that. See ?ds and ?"mcds-dot-exe" for more details.

Distance 1.0.7
----------------------

* dht2 now requires the object field in flatfile formatted data. The following vignette shows how to add an object field if your data does not have already have one: https://examples.distancesampling.org/Distance-cameratraps/camera-distill.html
* Fix bugs when a uniform is fitted with no adjustments
* Fixed error in dht2 when binned data used distend / distbegin
* Support for using MCDS.exe from Distance for Windows to run analyses. You can now download MCDS.exe using mrds::download_MCDS_dot_exe run analyses using this engine, rather (or in tandem with) the usual R optimizers provided in mrds. ds will pick the best (by likelihood) and return that. See ?ds and ?"mcds-dot-exe" for more details.

Distance 1.0.6
----------------------
Expand Down
6 changes: 6 additions & 0 deletions R/dht2.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ dht2 <- function(ddf, observations=NULL, transects=NULL, geo_strat=NULL,
ddf <- ddf_proc$ddf
transect_data <- ddf_proc$transect_data

# we don't support effort sum or replicate for multiddf
if((length(ddf) > 1) &
(stratification %in% c("effort_sum", "replicate"))){
stop("Effort-sum and replicate stratification not supported with multiple detection functions")
}

# grouped estimation
# time to recurse
if(!ddf_proc$groupsizeone){
Expand Down
2 changes: 1 addition & 1 deletion R/dht2_process_ddf.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dht2_process_ddf <- function(ddf, convert_units, er_est, strat_formula){
transect_data$n_par <- sum(unlist(lapply(ddf, function(x) length(x$par))))

if(any(table(bigdat$object) > 1)){
stop("object column but be unique over all data")
stop("object column must be unique over all data")
}

list(ddf = ddf,
Expand Down

0 comments on commit dd551b8

Please sign in to comment.