Early View (EV): 1-EV of sampling (i.e. via records of a target group; Anderson 2003), and integrated into model calibration to correct for associated biases in environmental space (Phillips et al. 2009). However, such information is frequently unavail- able, leaving researchers with a quandary: how to reduce the efects of biased sampling without reducing the signal of the species’ niche (Anderson 2012). Viable solutions in such cases include thinning (also known as ‘iltering’) occur- rence records either in environmental space or geographic space. hinning in environmental space directly addresses the problem that proximally afects model calibration (de Oliveira et al. 2014, Varela et al. 2014). In contrast, thinning in geographic space, or spatial thinning, acts in the dimen- sions in which the original bias occurred – e.g. the collection of occurrence records (Reddy and Dávalos 2003, Kadmon et al. 2004, Anderson 2012). Here we consider spatial thinning (i.e. in geographical space), which has been applied frequently and can result in species occurrence data that yield better performing ENMs (Pearson et al. 2007, Veloz 2009, Kramer-Schadt et al. 2013, Syfert et al. 2013, Verbruggen et al. 2013, Boria et al. 2014, Fourcade et al. 2014). Current spatial thinning methods generally fall into one of two categories, either employing stratiied random sampling or thinning based on nearest neighbor distance. One method in the irst category entails Ecography 38: 001–005, 2015 doi: 10.1111/ecog.01132 © 2015 he Authors. Ecography © 2015 Nordic Society Oikos Subject Editor: hiago Rangel. Editor-in-Chief: Miguel Araújo. Accepted 18 November 2014 Correlative techniques for modeling species niches and their associated geographic distributions (often termed ecological niche modeling, ENM; or species distribution modeling, SDM) are an important component of many biogeographic, evolutionary, and conservation-related studies (Elith and Leathwick 2009, Peterson et al. 2011, Araújo and Peterson 2012, Warren 2012). However, addressing the efects of sampling bias remains an important outstanding issue. For many datasets of occurrence records (especially from muse- ums and herbaria), geographic sampling bias is pervasive (Hijmans et al. 2000, Reddy and Dávalos 2003, Graham et al. 2004, Kadmon et al. 2004, Hijmans 2012). Such biases can lead to environmental bias as well, resulting in an over-representation of environmental conditions associ- ated with regions of higher sampling (Williams et al. 2002, Kadmon et al. 2004, Anderson and Gonzalez 2011). ENMs constructed with such data may it the environmental sig- nal of the bias, in addition to that of the niche, hindering model interpretation and application (Araújo and Guisan 2006, Wintle and Bardos 2006). Furthermore, environmen- tal biases lead to inlated estimates of model performance (Veloz 2009, Hijmans 2012). Several approaches can ameliorate the efects of sampling bias. Ideally, sampling efort across geography is quanti- ied either directly or via indices derived from the results spThin: an R package for spatial thinning of species occurrence records for use in ecological niche models Matthew E. Aiello-Lammens, Robert A. Boria, Aleksandar Radosavljevic, Bruno Vilela and Robert P. Anderson M. E. Aiello-Lammens (matt.lammens@gmail.com), Dept of Ecology and Evolutionary Biology, Univ. of Connecticut, Storrs, CT 06269, USA, and Dept of Ecology and Evolution, Stony Brook Univ., Stony Brook, NY 11794, USA. – R. A. Boria, A. Radosavljevic and R. P. Anderson, Dept of Biology, City College of the City Univ. of New York, New York, NY 10031, USA. AR present address: Plant Biology and Conservation, Northwestern Univ., Evanston, IL 60208, USA, and Dept of Plant Science, Chicago Botanic Garden, Glencoe, IL 60022, USA, and Dept of Botany, National Museum of Natural History, Smithsonian Inst., Washington, DC 20560, USA. RPA also at: Graduate Center of the City Univ. of New York, New York, NY 10016, USA, and Division of Vertebrate Zoology (Mammalogy), American Museum of Natural History, New York, NY 10024, USA. – B. Vilela, Depto de Ecologia, Inst. de Ciências Biológicas, Univ. Federal de Goiás, Goiânia, Goiás, Brazil, and Depto de Ciencias de la Vida, Univ. de Alcalá, ES-28805 Alcalá de Henares, Madrid, Spain. Spatial thinning of species occurrence records can help address problems associated with spatial sampling biases. Ideally, thinning removes the fewest records necessary to substantially reduce the efects of sampling bias, while simultaneously retaining the greatest amount of useful information. Spatial thinning can be done manually; however, this is prohibi- tively time consuming for large datasets. Using a randomization approach, the ‘thin’ function in the sphin R package returns a dataset with the maximum number of records for a given thinning distance, when run for suicient iterations. We here provide a worked example for the Caribbean spiny pocket mouse, where the results obtained match those of manual thinning.