[adegenet-forum] df2genind ignoring ind.names
Stephen Attwood
swahuaxi at yahoo.com
Mon Sep 7 15:32:08 CEST 2015
Apologies for bothering you all, but I suddenly started getting this error (the script below used to work ok on same dataset and I reinstalled with latest package adegenet after problem appeared but error persisted):
R
library(PopGenReport)
dataset.df <- read.csv("/home/.../dataset.csv",head = FALSE, sep = ",")
dataset.gen <- df2genind(dataset.df[, -c(1, 2)], ind.names = dataset.df[[1]], pop = dataset.df[[2]], loc.names = c("locusA","locusB","locusC","locusD","locusE","locusF","locusG","locusH","locusJ"), type = "codom", ploidy = 2, sep="/")
dataset.gen at ind.names # returns "Error: no slot of name "ind.names" for this object of class "genind""
dataset.gen at pop # returns the populations correctly
dataset.gen at tab # returns the genotypes correctly
dataset.df[[1]] # returns the ind.names correctly
Can anyone advise as to how to fix the above code so that the ind.names are correctly slotted into the genind object?
I run R on linux Mint.
I also noticed that PopGenReport began to return the error "could not find function "pairwise.fst"" in computation of Nei’s pairwise Fst, and that this error began to appear from the same time as above. Are both these problems likely to be due to changes in adegenet?
These are great tools by the way - I use them often.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150907/59462931/attachment.html>
More information about the adegenet-forum
mailing list