{Disarmed} Re: [distance-sampling] Error convert.units is deprecated

134 views
Skip to first unread message

Eric Rexstad

unread,
Aug 13, 2022, 3:19:01 AM8/13/22
to Martin Poot, distance-sampling
Good morning Martin

There were modifications to the names of some arguments in release 1.0.5 of Distance placed on CRAN in March of 2022.  Those name changes were listed in the "NEWS" portion of that release (see below) and posted on the distancesampling.org​ blog (http://distancesampling.org/blog/2022/03/17/distance-r-package-updates):
Posts. 25 May 2022 » New Release of Distance 7.4; 23 May 2022 » Bug and workaround for Distance 7.4; 17 Mar 2022 » New versions of R packages; 16 Feb 2022 » Release of Distance 7.4; 14 Feb 2022 » Introductory workshop 11-22 April 2022; 03 Feb 2022 » Widening participation scholarship applications being accepted for April 2022 introductory workshop; 01 Aug 2021 » Further optimisation ...


Distance 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()
  * bootdht():
    * convert.units -> convert_units
  * ds():
    * dht.group       -> 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 info)
* fix bug where polynomial adjustments started at the wrong order (2 rather than 4)

The snippet of code you sent will again work fine by simply changing the name of the argument convert.units​ to convert_units​.


From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Martin Poot <mjm...@gmail.com>
Sent: 12 August 2022 16:29
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] Error convert.units is deprecated
 
Dear all,

My scripts of Distance in R are not working anymore. 
The following error message I get:

 wren.hn <- ds(data=wren_lt,
+               key="hn",
+               adjustment=NULL,
+               convert.units=conversion.factor)

Error in .deprecated_args(c("dht.group", "region.table", "sample.table",  :
  Argument: convert.units is deprecated, check documentation.

What has gone wrong? I have recently updated R to 4.2.1. Also updated the last version of Distance.

with best wishes,

Martin Poot
 

--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/a1ffb656-8030-43a5-8d51-8ad3442afc0an%40googlegroups.com.
Y
Reply all
Reply to author
Forward
0 new messages