The following line in misc.R: if (i==1) ind<-dum else ind<-c(ind,dum) causes the following error when one of the populations is called '1' AND it doesn't appear first in sort(unique(data[,1])):
> data
/// GENIND OBJECT /////////
// 61 individuals; 7 loci; 14 alleles; size: 16.9 Kb
// Basic content
@tab: 61 x 14 matrix of allele counts
@loc.n.all: number of alleles per locus (range: 2-2)
@loc.fac: locus factor for the 14 columns of @tab
@all.names: list of allele names for each locus
@ploidy: ploidy of each individual (range: 2-2)
@type: codom
@call: df2genind(X = locus, sep = "/", ind.names = sample, pop = pop, ploidy = 2)
// Optional content
@pop: population of each individual (group size range: 1-13)
> data$pop
[1] F F F 1 1 5 1 2 5 4 N 3 D D D D D D D 5 D C C C D C C D D 2 1 4 1 D N F F F
[39] F F F F F F L C C K C C M M M K K C C L F 4 2
Levels: F 1 5 2 4 N 3 D C L K M
> getal(data)
Error in data.frame(pop = rep(data[, 1], 2), ind = ind, al = rbind(firstal, :
arguments imply differing number of rows: 122, 96
The offending line should be fixed to just ind<-c(ind,dum). The obvious workaround for anyone facing the issue is to guarantee that none of the populations is called '1'.
The following line in misc.R:
if (i==1) ind<-dum else ind<-c(ind,dum)
causes the following error when one of the populations is called '1' AND it doesn't appear first insort(unique(data[,1]))
:The offending line should be fixed to just
ind<-c(ind,dum)
. The obvious workaround for anyone facing the issue is to guarantee that none of the populations is called '1'.