Geographic and environmental dispersion of clonal genotypes.
For genotypes with multiple clones collected from the wild, we
calculated pairwise geographic distance between collections within each
clonal genotype based on GPS coordinates of each collection with thedistHaversine function in R v3.4.1 (Hijmans, Williams, & Vennes,
2019; R Core Team, 2013). To measure pairwise environmental distance, we
calculated Euclidian distance for environmental variables in three
dimensions with the dist function in R, as follows: coordinates
for the first and second dimension were obtained as the first and second
principal components in a PCA of the 19 WorldClim BioClim variables
(Fick & Hijmans, 2017) for each of our collection locations. Principal
components were calculated using the prcomp function in R with
scaled unit variance. The values of the first two PCs explained 50.9%
and 22.7% of the variance respectively. For the third coordinate, we
downloaded the average sea surface salinity dataset for the years
2005-2017 from the World Ocean Atlas (Zweng et al., 2019) and identified
the salinity of the ocean water nearest to each collection site
(excluding one sample collected > 40 km from the coast).
All three coordinates where then centered and scaled with thescale function in R before calculating distance.