Running examples in ‘dartR-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: gl.ld.haplotype
> ### Title: Visualize patterns of linkage disequilibrium and identification
> ###   of haplotypes
> ### Aliases: gl.ld.haplotype
> 
> ### ** Examples
> 
> require("dartR.data")
> x <- platypus.gl
> x <- gl.filter.callrate(x,threshold = 1)
Starting gl.filter.callrate 
  Processing genlight object with SNP data
  Warning: data include loci that are scored NA across all individuals.
  Consider filtering using gl <- gl.filter.allna(gl)
  Warning: Data may include monomorphic loci in call rate 
                    calculations for filtering
  Recalculating Call Rate
  Removing loci based on Call Rate, threshold = 1 
Completed: gl.filter.callrate 
> x <- gl.keep.pop(x, pop.list = "TENTERFIELD")
Starting gl.keep.pop 
  Processing genlight object with SNP data
  Checking for presence of nominated populations
  Retaining only populations TENTERFIELD 
  Warning: Resultant dataset may contain monomorphic loci
  Locus metrics not recalculated
Completed: gl.keep.pop 
> x$chromosome <- as.factor(x$other$loc.metrics$Chrom_Platypus_Chrom_NCBIv1)
> x$position <- x$other$loc.metrics$ChromPos_Platypus_Chrom_NCBIv1
> ld_res <- gl.ld.haplotype(x,chrom_name = "NC_041728.1_chromosome_1",
+                           ld_max_pairwise = 10000000 )
Starting gl.ld.haplotype 
  Processing genlight object with SNP data
  Calculating pairwise LD in population TENTERFIELD 
  Analysing chromosome NC_041728.1_chromosome_1 
  The maximum distance at which LD should be calculated 
                 (ld_max_pairwise) is too short for chromosome NC_041728.1_chromosome_1 . Setting this distance to 33814744 bp
Please note that 'maptools' will be retired during October 2023,
plan transition at your earliest convenience (see
https://r-spatial.org/r/2023/05/15/evolution4.html and earlier blogs
for guidance);some functionality will be moved to 'sp'.
 Checking rgeos availability: FALSE
Error: 'elide' is not an exported object from 'namespace:maptools'
Execution halted