To extract all the ranges of assignment I think you can do as follows.
I have built the code around the example present in the documentation of IsoriX (?isofind) and I used the package raster to manipulate the data produced by isofind().
We could also use the package sf, but I wanted to keep it simple and short.
library(IsoriX)
## Same as example from ?isofind
GNIPDataDEagg <- prepsources(data = GNIPDataDE)
GermanFit <- isofit(data = GNIPDataDEagg,
mean_model_fix = list(elev = TRUE, lat_abs = TRUE))
GermanScape <- isoscape(raster = ElevRasterDE,
isofit = GermanFit)
CalibAlien <- calibfit(data = CalibDataAlien,
isofit = GermanFit)
AssignmentDry <- isofind(data = AssignDataAlien,
isoscape = GermanScape,
calibfit = CalibAlien)
## Custom code for extracting the range for each assigned Aliens (or Bats :-)
library(raster)
results <- data.frame(Bat = names(AssignmentDry$sample$pv), long_min = NA, long_max = NA, lat_min = NA, lat_max = NA)
get_range <- function(rasterBrick, layer_n) {
coord <- apply(coordinates(rasterBrick[[layer_n]])[values(rasterBrick[[layer_n]]) > 0.05, ], 2, range)
c("long_min" = coord[[1]], "long_max" = coord[[2]], "lat_min" = coord[[3]], "lat_max" = coord[[4]])
}
for (layer_n in seq_len(nlayers(AssignmentDry$sample$pv))) {
results[layer_n, c("long_min", "long_max", "lat_min", "lat_max")] <- get_range(AssignmentDry$sample$pv, layer_n)
}
results
#Bat long_min long_max lat_min lat_max
#1 Alien_1 5.541527 15.45819 47.04153 55.45819
#2 Alien_2 5.541527 15.45819 47.04153 55.45819
#3 Alien_3 5.541527 15.45819 47.04153 55.45819
#4 Alien_4 5.541527 15.45819 47.04153 55.45819
#5 Alien_5 5.541527 15.45819 47.04153 55.45819
#6 Alien_6 5.541527 15.45819 47.04153 55.45819
#7 Alien_7 5.541527 15.45819 47.04153 55.45819
#8 Alien_8 5.541527 15.45819 47.04153 55.45819
#9 Alien_9 5.541527 11.87486 48.62486 55.45819
#10 Alien_10 5.541527 15.45819 47.04153 55.45819
Once you have obtained such a table (with your own results), it should be straightforward to export as csv, xls or whatever tabulated format you want since it is a data frame.
If you need, I could show you how to do that, but this has nothing to do with IsoriX :-)
I hope that will work for you, please let us know either way.
Best,
Alex