Sounds like you do not have a definition of your populations.
Can you try
table(pop(i))
and see if you have defined your populations correctly.
Cheers,Bernd
==============================================================================
Dr Bernd Gruber )/_
_.--..---"-,--c_
Professor Ecological Modelling \|..' ._O__)_
Tel: (02) 6206 3804 ,=. _.+ _ \..--( /
Fax: (02) 6201 2328 \\.-''_.-' \ ( \_
Institute for Applied Ecology `''' `\__ /\
Faculty of Science and Technology ')
University of Canberra ACT 2601 AUSTRALIA
Email: bernd....@canberra.edu.au
WWW: bernd-gruber
Australian Government Higher Education Provider Number CRICOS #00212K
NOTICE & DISCLAIMER: This email and any files transmitted with it may contain
confidential or copyright material and are for the attention of the addressee
only. If you have received this email in error please notify us by email
reply and delete it from your system. The University of Canberra accepts
no liability for any damage caused by any virus transmitted by this email.
==============================================================================
From: da...@googlegroups.com <da...@googlegroups.com>
On Behalf Of jlsr
Sent: Friday, 30 October 2020 15:38
To: dartR <da...@googlegroups.com>
Subject: [dartR] amova error: Error in pop.num[i] <- which(pop.names[i] == pops) : replacement has length zero
Good day everyone,
I tried to perform amova for my SNP and DArT data using the code gl.amova(i) and gl.amova2(i). However, both codes resulted to an error: Error in pop.num[i] <- which(pop.names[i] == pops) : replacement has length zero. I also tried to use the gl.amova2.r file I saw in previous threads here but same error showed.
What could be the problem with the code or the data?
Thank you very much.
Laurence
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dartr+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dartr/7580b49e-9070-478f-aab7-96d25a1ffa79n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/SYCPR01MB3998A2AA56670D5A54465F1FD4150%40SYCPR01MB3998.ausprd01.prod.outlook.com.
Hi Laurence,
Have a look at the dartR manual and specifically the gl.recode.pop function
https://cran.r-project.org/web/packages/dartR/dartR.pdf
Cheers,
Olly
-----
Oliver Berry
Leader, Environomics Future Science Platform
National Collections and Marine Infrastructure | CSIRO
oliver...@csiro.au | 08 9333 6584 | 0400 747 197
Indian Ocean Marine Research Centre, The University of Western Australia, Crawley, WA, 6009, Australia
http://www.csiro.au/environomics
CSIRO Australia’s National Science Agency | csiro.au
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/95551dbd-84f0-4012-972b-ec6391c99092n%40googlegroups.com.
Hi Laurence,
It’s a very simple format, but try the function gl.make.recode.pop on page 59 of the manual to get started.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/5b9ba74d-516c-40da-9937-e5684af8e094n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/84ef20ac-de3e-4845-b8f2-4f46327d3dc2n%40googlegroups.com.