New versions of distance sampling R packages

Skip to first unread message

Len Thomas

Mar 17, 2022, 11:41:12 PMMar 17
to distance-sampling
Dear distance-sampling list,

I am pleased to announce new versions of our R packages Distance, mrds,
dsm and dsims are available on CRAN. We recommend all users of these
packages update to the newest versions.

A full list of changes and updates is given below, but there are a
couple I'd like particularly to bring to your attention.

First, we are taking steps to improve consistency in function and
argument names in our packages, and as part of this for the Distance and
mrds packages we have renamed a few functions and argument that used to
have a dot in them to having an underscore -- so, for example
create.bins() is now create_bins. See below for full list.

Second, we have improved the way that automated and manual selection of
detection function adjustment terms in the Distance package, to make
them fully congruent with the way Distance for Windows does model
selection. In particular, if you use automated selection of Hermite or
simple polynomials with half-normal or Hazard rate key function, the
lowest polynomial fitted is now order 4 (it was 2 before). For manual
selection, the way the order argument works has been changed and a new
nadj argument has been added.

These changes affect some of our code example vignettes, available at
We are updating these, and updates should be finalized by 21st March.

Thanks to those who have made feature requests or reported issues. If
you do find any problems, or want to suggest a new feature, please feel
free to raise an issue at
or in the github page for each package

With best wishes to all, Len Thomas
Distance development team

Full list of changes and updates:


Changes in version 1.0.5

* To improve consistency in functions and arguments in the package, some
functions and arguments have changed from . separation to _. An error is
now thrown when the "old" arguments/functions using . are used. This
error will be removed in Distance 1.0.6.
create.bins() -> create_bins()
convert.units -> convert_units
ds(): -> dht_group
region.table -> region_table
sample.table -> sample_table
obs.table -> obs_table
convert.units -> convert_units
er.var -> er_var
debug.level -> debug_level
initial.values -> initial_values
max.adjustments -> max_adjustments
* fix bootdht issue when cluster results were requests (#103)
* improve flatfile documentation (thanks to Maggie Blake for pointing
this out)
* fixed bug in cutpoint calculations in create.bins (#108)
* order argument to ds() is now only used to specify order, to fix a
given number of adjustments use the new argument nadj (see ?ds for more
* fix bug where polynomial adjustments started at the wrong order (2
rather than 4)


Changes in version 2.2.6

* Individuals summary table for dht now includes k (number of transects)
* Add effective detection radius (EDR) and its uncertainty to summary output
* Change default rounding of chi-squared test tables. This can be
customized using print(ddf.gof(...), digits=?) for e.g., printing with
* New detection function: two-part normal ("tpn"), useful for aerial
surveys in mountainous terrain, see Becker EF, Christ AM (2015) A
Unimodal Model for Double Observer Distance Sampling Surveys. PLOS ONE
10(8): e0136403. and
* To improve consistency in functions and arguments in the package, some
functions will change from . separation to _. For now both versions
exist but will be removed in mrds 2.2.7. - add_df_covar_line ->
add.df.covar.line - p_dist_table -> p.dist.table
* Variable strip widths are now supported in dht. Users should supply an
additional column to the sample data.frame ("CoveredArea") giving the
total area covered in the given transect and set
options=list(areas.supplied=TRUE). Thanks to Megan Ferguson for
providing an example, code and feedback.


Changes in version 2.3.2

* fixed bug in offset calculation in dsm_varprop se estimation where
offsets were logged twice. Thanks to Megan Ferguson for spotting this.
* documentation now in rmarkdown format

dsims 0.2.1

New Features

* Now interfaces with new syntax in Distance >= 1.0.5 (it will remain
backwards compatible with older versions of Distance for this release)

Bug Fixes

* Plus sampling simulations now issue a warning and modify to minus
sampling - these should not have run in previous versions.
* Fixed default simulation truncation distance to 50 in the analyses
(will fix dssd to be consistent with this in release 0.3.2)
* Fixed the recording of warning / error indexing in parallel simulations

Len Thomas (he/him) @len_thom
Centre for Research into Ecological and Environmental Modelling
and School of Mathematics and Statistics
The Observatory, University of St Andrews, Scotland KY16 9LZ
Office: UK+1334-461801 Admin: UK+1334-461842

While I may be sending this email outside of my normal office hours,
I have no expectation to receive a reply outside of yours.

The University of St Andrews is a charity
registered in Scotland, No SC013532.
Reply all
Reply to author
0 new messages