[adegenet-forum] duplictaed names from genepop to genind format

Jombart, Thibaut t.jombart at imperial.ac.uk
Tue Jun 21 10:53:48 CEST 2011


Hello,

the quickest way to fix this in the devel - tomorrow official - version of the package is:
####
indNames(data) <- 1:nInd(data)
####
assuming 'data' is your genind object.

Otherwise, with older versions:
####
data at ind.names <- as.character(1:nrow(data at tab))
####

Cheers

Thibaut

________________________________
From: adegenet-forum-bounces at r-forge.wu-wien.ac.at [adegenet-forum-bounces at r-forge.wu-wien.ac.at] on behalf of nicolas dussex [nicolas.dussex at gmail.com]
Sent: 21 June 2011 02:04
To: adegenet-forum at r-forge.wu-wien.ac.at
Subject: [adegenet-forum] duplictaed names from genepop to genind format

Hi,

When entering the following command in R to look for population clustering, I got this error message:

> grp <- find.clusters(data, max.n.clust = 40)

I got the following erorr message:

BRE CFO CPA DUS HOR MAA NUG OBI OHA STE SUB TON VIC WAU WEK
 10  53  30  11  28  10  27  64  57  10  13   9  22  16  23
BRE CFO CPA DUS HOR MAA NUG OBI OHA STE SUB TON VIC WAU WEK
 10  53  30  11  28  10  27  64  57  10  13   9  22  16  23
Error in `row.names<-.data.frame`(`*tmp*`, value = c("BRE", "BRE", "BRE",  :
  duplicate 'row.names' are not allowed
In addition: Warning messages:
1: In validityMethod(object) :
duplicate names in ind.names:
2: In validityMethod(object) :
duplicate names in ind.names:
3: In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278 [... truncated]
4: non-unique values when setting 'row.names': ‘BRE’, ‘CFO’, ‘CPA’, ‘DUS’, ‘HOR’, ‘MAA’, ‘NUG’, ‘OBI’, ‘OHA’, ‘STE’, ‘SUB’, ‘TON’, ‘VIC’, ‘WAU’, ‘WEK’
>
Looking at past entries on the forum, I found that the matter had been discussed previouslz but I thought the bug had been fixed.

Do you have a solution to this issue?

Much appreciated.

Nic

--
Nicolas Dussex
PhD Candidate
Department of Zoology
University of Otago
340 Great King Street
P.O.Box 56
Dunedin 9054
New Zealand

Mobile: 021 02790938

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20110621/7db410be/attachment.htm>


More information about the adegenet-forum mailing list