Changelog
Source:NEWS.md
misc.debris 1.0.0
Breaking changes
mode()has been renamedstats_mode(). The old name maskedbase::mode(). Update any calls to the new name;mode()is no longer exported.get_weather_list()now returnsNULLfor a station whose data could not be fetched, and reports the reason as a message. Previously that element was the character string “Error in acquiring weather data for this station.”.get_weather_list()now names each list element using the first row ofstation_name(previously the second row), falling back to the station code when no data were returned.check_oz_lonlat()now accepts latitudes from -43.7 to -9 (previously -43.5 to -10), so locations in southern Tasmania and the Torres Strait are no longer rejected.
New features
stats_mode()gains anna.rmargument,TRUEby default, so that missing values can be removed or counted explicitly.check_oz_lonlat()is now vectorised. When any value is outside Australia, the error reports only the offending values.check_date_seq()now also warns when dates are unsorted or duplicated, and errors on empty input orNAdates.create_climograph()now errors with a message naming any missing columns (date,rainfall,air_tmin,air_tmax) and whenair_tminorair_tmaxcontain no non-missing values.
Bug fixes
stats_mode()no longer errors for vectors with more than one element in R >= 4.3 because of an invalid||condition on the input check.stats_mode()now works for character, logical, integer andDateinput and returns values of the same type. Previously values were coerced withas.numeric(), givingNAfor character input and losing precision for some doubles. It also gives a clearer error whenxdoes not exist.check_date_seq()no longer errors with “object ‘location’ not found” wheny = NULL, and no longer gives a misleading warning for unsorted or duplicated dates.check_oz_lonlat()now gives informative errors forNA, empty and non-numeric input instead of failing inif().create_climograph()no longer divides by zero when there is no rainfall or when minimum and maximum temperature are equal.get_weather_list()no longer fails when one station cannot be fetched or returns a single row, which previously broke the naming of the whole list.
Minor improvements
rle2()is faster, now running in linear time, and no longer relies on {lubridate}. Results are unchanged. It errors ifxandindexhave different lengths.get_weather_list()now checks that at least one station and two non-missing API keys are supplied, and.get_weatherOz()rejectsNAor multi-element station codes.Documentation corrections:
rle2()compares with>=and returns the columnsindex,valueandtest;create_climograph()plots precipitation on the left axis and temperature on the right;check_date_seq()andcheck_oz_lonlat()describe what they return and when they warn or error.Expanded the test suite for all of the above.
misc.debris 0.1.3
Bug Fixes
Fixes bug in
rle2()examples where DPIRD colours were not available.Fixes bug in
check_oz_lonlat()that didn’t use {cli} for error messages.Fixes bug in
check_oz_lonlat()that didn’t return the incorrect lon or lat values provided by the user in the error message.
misc.debris 0.1.2
Minor Changes
Add examples to all functions that detail more than one option where applicable.
Upgrades test infrastructure.
Bug Changes
Fixes documentation where several examples were broken.
Fixes bug in
get_weather_list()that caused the function to fail.Import missing {data.table} functionality.
misc.debris 0.1.1
- Fixes example in
get_weather_list()documentation.