popgenreport function. It needs to be provided with a genind object with spatial coordinates, a friction map (raster) and a specification which type of genetic distance should be used.
Once all three type of input are provided with the necessary input, a landscape genetic analysis using least cost path analysis is computed (see Cushman et al. 2010, Landguth et al. 2010). Depending on the genetic distance meassurement this is done on a subpopulation basis (D, Gst.Hedrick, Gst.Nei=Fst) or on an individual basis (Kosman, Smouse).landgenreport(cats, fric.raster, gen.distance = "Gst.Nei", NN=4,
pathtype="leastcost", plotpath=TRUE, theta=1, mk.resistance = TRUE ,
mapdotcolor = "blue", mapdotsize=1, mapdotalpha = 0.4, mapdottype = 19,
mapzoom = NULL,mk.custom = FALSE, fname = "LandGenReport", foldername = "results",
path.pgr = NULL, mk.Rcode = FALSE, mk.complete = FALSE, mk.pdf = TRUE)popgenreport how to include coordinates to a genind object. The coordinates need to be projected. Latlongs are not valid, because Euclidean distances are calcuated based on these coordinates. For an example how to convert latlongs into a projected format have a look at the vignette that comes with this package. The friction needs to be a raster and needs to be in the same projection as the genind object. Also the type of genetic distance to be used needs to be specified.popgenreport, wassermann,
genleastcost, lgrMMRRlc<-landgenreport(cats=landgen, fric.raster=fric.raster, gen.distance="D", mk.resistance=TRUE)
names(lc$leastcost)Run the code above in your browser using DataLab