courtiol / IsoriX

This is the website dedicated to the development of the R package IsoriX
12 stars 5 forks source link

plot.ISOFIND should not show group when there is only one layer #120

Closed courtiol closed 3 years ago

courtiol commented 3 years ago

This

GNIPDataDEagg   <- prepsources(data = GNIPDataDE)
EuropeFit       <- isofit(data = GNIPDataEUagg, mean_model_fix = list(elev = TRUE, lat_abs = TRUE))
ElevEurope      <- prepraster(raster = ElevWorld, isofit = EuropeFit, aggregation_factor = 10)
EuropeIsoscape  <- isoscape(raster = ElevEurope, isofit = EuropeFit)
CalibBatsEU     <- calibfit(data = CalibDataBat, isofit = EuropeFit)
Assigned15      <- isofind(data = subset(AssignDataBat, sample_ID == "Nnoc_15"),
                           isoscape = EuropeIsoscape, calibfit = CalibBatsEU)
plot(Assigned15)

shows image but it makes no sense since there is only one ID. It should default to plot(Assigned15, who = 1) in such a case.