<div dir="ltr">Dear Adegenet forum,<div><br></div><div>As a first step to the sPCA, I am trying to plot the xy points on the topo map using the following code similar to the example "rupica" in the SPCA tutorial that appears on page 27. </div><div><br></div><div>
<p class="gmail-p1"><span class="gmail-s1">plot(</span>data<span class="gmail-s1">$</span>other<span class="gmail-s1">$</span>topo.jam<span class="gmail-s1">)</span></p><p class="gmail-p1"><span class="gmail-s1">
</span></p><p class="gmail-p1">points(<span class="gmail-s1">xy</span>,<span class="gmail-s1">col</span>=<span class="gmail-s2">"red"</span>, <span class="gmail-s1">pch</span>=<span class="gmail-s3">20</span>)</p></div><div>Both the xy points and the map of my study region are part of the Genind object I created, see details below. </div><div><br></div><div>
<div class="gmail-page" title="Page 26">
</div><div><div><br></div><div><br></div><div>---------------</div><div><br></div><div><div>/// GENIND OBJECT /////////</div><div><br></div><div> // 158 individuals; 6,451 loci; 12,902 alleles; size: 10.7 Mb</div><div><br></div><div> // Basic content</div><div> @tab: 158 x 12902 matrix of allele counts</div><div> @loc.n.all: number of alleles per locus (range: 2-2)</div><div> @loc.fac: locus factor for the 12902 columns of @tab</div><div> @all.names: list of allele names for each locus</div><div> @ploidy: ploidy of each individual (range: 2-2)</div><div> @type: codom</div><div> @call: read.structure(file = "~/Documents/Trochilus/second_chapter/Analysis/structure/input/GBS_all_pop_pheno.stru", </div><div> n.ind = 158, n.loc = 6451, onerowperind = TRUE, col.lab = 1, </div><div> col.pop = 2, col.others = 3:8, row.marknames = 0, ask = FALSE)</div><div><br></div><div> // Optional content</div><div> @pop: population of each individual (group size range: 6-37)</div><div> @strata: a data frame with 3 columns ( sex, phenotype, HI )</div><div> @other: a list containing: X xy topo topo.east topo.jam </div><div>--------------------------------------------------------------------------------------</div></div></div><div><div>$topo.jam</div><div>class : RasterLayer </div><div>band : 1 (of 3 bands)</div><div>dimensions : 1416, 2558, 3622128 (nrow, ncol, ncell)</div><div>resolution : 0.0008333333, 0.0008333333 (x, y)</div><div>extent : -78.27649, -76.14482, 17.48716, 18.66716 (xmin, xmax, ymin, ymax)</div><div>coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 </div><div>data source : /Users/carolineduffie/Documents/Trochilus/second_chapter/Analysis/PCA/sPCA/jamaica_elevation.tif </div><div>names : jamaica_elevation </div><div>values : 0, 255 (min, max)</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div>