[adegenet-forum] Hybridize Function / df2genind error message

Spencer Bruce goatsrunfaster at gmail.com
Mon Oct 27 14:57:21 CET 2014


Hello All,

After hybridizing two populations, I converted the genind file to at
dataframe to randomly extract individuals. I then attempt to convert this
data frame back into a genind file, but get the error message below:

> F1_G1 <- df2genind(randomF1)
Error in df2genind(randomF1) :
  2 alleles cannot be coded by a total of 19 characters

Im assuming this is because the "pop" column, instead of being coded by a
number contains the text generated by the hybridize function
"honnedaga-tdhybrids"

I tried to resolve this by using the following code, but ran into a second
error message:

> randomF1$pop[randomF1$pop == "honnedaga-tdhybrids"] <- 1
Warning message:
In `[<-.factor`(`*tmp*`, randomF1$pop == "honnedaga-tdhybrids",  :
  invalid factor level, NA generated

any idea how I might be able to fix this? Thanks in advance!!!

-Spencer

-- 
Spencer A Bruce
200 Washington St.
Troy, NY 12180
518 225 0787
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20141027/18d9765e/attachment.html>


More information about the adegenet-forum mailing list