[adegenet-forum] DAPC and coordinates
t.jombart at imperial.ac.uk
Fri Dec 3 23:07:36 CET 2010
what are the error messages you received? To try and find the problem, you can try to plot the spatial coordinates separately to make sure everything's OK. For instance:
Also compare the dimensions of the two objects:
If the number of rows differ, this is a problem. I will be travelling the next week, so sorry if I don't reply soon.
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] On Behalf Of Bernhard Stoeckle (Wildbiologie) [stoeckle at wzw.tum.de]
Sent: 02 December 2010 08:49
To: adegenet-forum at r-forge.wu-wien.ac.at
Subject: [adegenet-forum] DAPC and coordinates
thank you very much for your last answer. It worked perfect! I am really sorry
but I have one last question and I would be glad if you can help me again.
I have a microsatellite data set (8 populations and 12 loci) with geographical coordinates and I made a
dapc and it worked well. Then I tried to visualize the dapc in combination with the
geographical coordinates and it failed. I did the following:
I loaded also the package "maps" and I created a textfile named popInfo and it
looked like this:
Then I tried to visualize the dapc results according
to the example eHDGP in the manual with the following commands:
> xy <- cbind(grp$other$popInfo$Longitude, grp$other$popInfo$Latitude)
> map(fill=TRUE, col="lightgrey")
> colorplot(xy, -dapc1$grp.coord, cex=3, add=TRUE, trans=FALSE)
But it did not work. R showed a couple of error messages.
I would be glad if you can help me again.
Technische Universitaet Muenchen TUM
Lehrstuhl für Zoologie
AG Molekulare Zoologie
More information about the adegenet-forum