Hi,
I keep getting the following error when trying to run poppr.amova
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length
The code I'm using is:
>blake.amova <- read.table("blakeAMOVA.txt", header = TRUE) #diploid genotypes 0,1,2, NA
>blake.amova[1:5, 1:9]
ID Population Region X00001 X00002 X00003 X00004 X00005 X00006
1 blaASCA712 ASCA NWNENG 0 0 0 0 0 0
2 blaASCA713 ASCA NWNENG NA 0 0 0 0 2
3 blaASCA714 ASCA NWNENG 0 NA 0 0 1 0
4 blaASCA715 ASCA NWNENG 0 NA 0 0 0 0
5 blaASCA716 ASCA NWNENG 0 0 NA 2 0 0
# Move the Population and Region columns to its own df
>blahier <- blake.amova[, c(2, 3)]
# Convert the df to genind object
>blake <- df2genind(blake.amova, sep = " ", ncode = 2L)
>blake$other$hierarchy <- blahier
>blake$pop <- blahier$Population
>strata(blake) <- other(blake)$hierarchy
>blakeclone <- as.genclone(blake)
>blaAMOVA <- poppr.amova(blakeclone, ~Population/Region)
Any assistance would be greatly appreciated.
Cheers,
John