quickPlot, which is no longer maintained (#54). NetLogoR now defines its own coordinates(), extent(), layerNames(), and numLayers() generics, so these continue to work unchanged. As a consequence, NetLogoR objects can no longer be plotted with quickPlot::Plot(); use plot() and points(), which draw through terra.dbscan, used to speed up the radius searches in inRadius();inRadius() and inCone() no longer require sf, which is now only needed by sf2turtles() and turtles2sf();speed improvements to NLset(), NLwith(), inRadius(), of(), and turtle(), achieved by indexing the underlying matrix/array directly instead of going through coordinate-conversion helpers.
speed improvements to inRadius() achieved by using frNN() (Find the Fixed Radius Nearest Neighbors) from the dbscan package instead of st_buffer() + st_intersection(), or using st_is_within_distace() from the sf package.
sp package is being retired in favour of sf, so everything in NetLogoR that still depends on it is now deprecated and will be removed in a future release. This affects spdf2turtles() (use sf2turtles()), turtles2spdf() (use turtles2sf()), bbox() on sp and raster objects, wrap() on SpatialPoints and SpatialPointsDataFrame objects, and passing a SpatialPointsDataFrame to agentMatrix(). The full transition to sf will follow in a separate release.[ on a worldArray assumed the array had exactly two layers, so extracting patch values from a worldArray with any other number of layers failed with "dims [product 2] do not match the length of object". It now uses the actual number of layers.worldMatrix of character values alongside a numeric one no longer corrupts both layers (#49). An array holds a single type, so the character values used to turn every layer into character, and were then coerced back to NA on the way out. worldArray now stores character layers as integer codes with their categories in a new levels slot, exactly as agentMatrix already does for character columns. of() reports the character values, plot() draws the layer as a categorical raster instead of warning "NAs introduced by coercion", NLwith() and NLset() accept and return the characters, and [[ and $ give back a character worldMatrix. Numeric layers stacked alongside a character one keep their own type. Assigning character values to a numeric layer with NLset() turns that whole layer into a character one, as assigning a string into a numeric vector does in base R, keeping the values of the patches that were not assigned.inRadius() with torus = TRUE no longer reports patches that were not among the agents2 supplied;of() on an agentMatrix now returns columns in the order given by var when a mix of factor and numeric variables is requested.SpatRaster via terra::plot(), which is what they have done since terra replaced raster;bbox() and extent() now cross-reference terra::ext() rather than sp::bbox() and raster::extent();.projNowhere object, which described a sp/raster buffering workflow the package no longer has.fastshp (#55);sp and raster to Suggests.
There is still the possibility to convert sp and raster objects into NetLogoR objects
and vice versa, but except for these functions, all the others do not rely anymore on
sp and raster objects and functions.terra;terra;rgeos;sf;NetLogoR will still work with R 3.6, but we no longer support it.car, Hmisc, plyr?sample) when the length of the argument x is 1.
This occurred under some (but now all) conditions where there are multiple agents with the same id, along with some agents with only one member within an id, and where the objective is to select one of the using oneOf or nOf(agent, n = 1). Now we use resample as defined in the examples of ?base::sample.NLwith() now handles NA values (#36)sf to Suggests, as it is used in tests.turtlesOn(). Error when the world was not square.inRadius now multiplies the width by a tiny amount so that the function returns an inclusive result.quickPlot >= 0.1.1.9000 dependency.SpaDES-related packages to only include the ones actually used.worldArray to extract subset layers.show methods for worldMatrix and worldArray, similar to RasterLayer and RasterStack.quickPlot::Plot works, e.g., Plot(agentMatrixObj) or Plot(worldMatrixObj) or Plot(worldArrayObj), Plot(worldArrayObj$layer1). addTo argument implemented for layering, Plot(worldMatrixObj); Plot(agentMatrixObj, addTo="worldMatrixObj") will plot the agents on the map.3.2.5 to 3.3.0 as required by dependency RandomFieldsUtils.