[adegenet-forum] data input

Mark Coulson coulsonmw at gmail.com
Fri Nov 28 12:57:04 CET 2014


Hello,

I am trying to read in a dataframe (rather than a genepop or other format)
with 1 column as population, 1 column as individual and 1 column as River
(which I would like as the @other tab). I've coded my alleles as 2-digit
codes with no separator. In excel this looks like 1134 or 0230 for example.

I've done df2genind(x, sep=NULL, ind.names=x$Individual, pop=x$Population,
missing="0", ploidy=2) but I get

Error in df2genind(scot, sep = NULL, ind.names = scot$Individual, pop =
scot$Population,  :
  2 alleles cannot be coded by a total of 27 characters

I notice that R is reading any genotype beginning with a 0 as 230 instead
of 0230. I may also want to include some additional 'other' variables such
as coordinates so looking for options for bringing in a dataframe instead
of particular genetic formats.

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20141128/b4e27ab6/attachment.html>


More information about the adegenet-forum mailing list