[adegenet-forum] Not working Monmonier

Vojtěch Zeisek vojta at trapa.cz
Sun Jul 13 22:18:10 CEST 2014


Hello,
I tried Monmonier analysis as described in Adegent tutorial. I'm not familiar 
with that method (for similar question I used IMa2 last time), so I was 
curious what it does. :-) I tried with relatively relatively large dataset. 
Individuals from one locality usually have same coordinates. The code:
> monmonier <- monmonier(xy=genind$other$xy, dist=dist(genind$tab), 
cn=chooseCN(genind$other$xy, ask=FALSE, type=5, d1=0, d2=2.5, plot.nb=FALSE, 
edit.nb=FALSE), nrun=1)
Indicate the threshold ('d' for default): d
> coords.monmonier(monmonier)
Error in output[[runname]]$dir1[i, ] <- halfway[which(eval.x == TRUE &  : 
  number of items to replace is not a multiple of replacement length
Calls: coords.monmonier
> plot(monmonier)
Warning messages:
1: In arrows(obj$dir1$path[1:(nrow(obj$dir1$path) - 1), 1], obj$dir1$path[1:
(nrow(obj$dir1$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
2: In arrows(obj$dir1$path[1:(nrow(obj$dir1$path) - 1), 1], obj$dir1$path[1:
(nrow(obj$dir1$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
3: In arrows(obj$dir2$path[1:(nrow(obj$dir2$path) - 1), 1], obj$dir2$path[1:
(nrow(obj$dir2$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
4: In arrows(obj$dir2$path[1:(nrow(obj$dir2$path) - 1), 1], obj$dir2$path[1:
(nrow(obj$dir2$path) -  :
  zero-length arrow is of indeterminate angle and so skipped
genind$other$xy contains geographical coordinates in WGS 84 (from GPS). The 
only problem coming to my mind are those repetitive coordinates (for 
individuals from one locality) - because of that, chooseCN practically allows 
only methods 5 and 6. Might be, I could try it with populations, but then I'm 
afraid to get little bit different information... Or might be I could add some 
little uncertainty to the coordinates...? I was also thinking if it could be 
because of missing data, but when I tried with genind object corrected for 
missing data, I ended up with same errors. Any ideas?
Sincerely,
Vojtěch

-- 
Vojtěch Zeisek
http://trapa.cz/en/

Department of Botany, Faculty of Science
Charles University in Prague
Benátská 2, Prague, 12801, CZ
http://botany.natur.cuni.cz/en/

Institute of Botany, Academy of Science
Zámek 1, Průhonice, 25243, CZ
http://www.ibot.cas.cz/en/

Czech Republic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140713/5d22bb73/attachment.sig>


More information about the adegenet-forum mailing list