[adegenet-forum] basic.stat_hierfstat
Maria Guerrina
maria.guerrina at edu.unige.it
Fri Nov 13 12:33:06 CET 2015
Dear Roman,
here I attach more details:
his is my dataset (named a), based on a STRUCTURE file
pop S1_51 S1_835 S1_938 S1_1132 S1_1317 S1_1350 S1_2321 S1_2451 S1_1640
1 8 3 2 1 0 4 3 4 0 4
2 8 3 2 1 0 4 3 4 0 4
3 8 3 2 3 3 4 3 4 4 4
4 8 3 2 3 3 4 3 4 4 4
5 8 3 2 1 0 4 3 4 4 4
6 8 3 2 1 0 4 3 4 4 4
7 8 3 2 1 3 4 3 4 4 4
8 8 3 2 1 3 4 3 4 4 4
9 8 2 2 1 3 4 3 4 4 4
10 8 3 2 3 3 4 3 4 4 4
11 9 2 2 1 3 4 3 4 4 4
12 9 3 2 1 3 4 3 4 4 4
13 9 3 2 1 3 4 3 4 0 4
14 9 3 2 1 3 4 3 4 0 4
15 9 3 2 1 3 4 3 4 0 4
16 9 3 2 1 3 4 3 4 0 4
17 9 3 2 1 3 4 3 4 2 4
18 9 3 2 1 3 4 3 4 4 4
19 9 3 2 1 3 4 0 4 4 4
20 9 3 2 1 3 4 0 4 4 4
21 11 3 2 3 3 4 3 4 4 4
22 11 3 2 3 3 4 3 4 4 4
23 11 3 2 3 3 2 3 4 4 4
24 11 3 2 3 3 4 3 4 4 4
then, I transform my data frame in a genind object (named Mydata1). If I apply the basic.stats function, I get the following error messsage
> basicstat <- basic.stats(Mydata1, diploid = TRUE, digits = 4)
Error in unique.default(x, nmax = nmax) :
unique() si applica solo a vettori
>
On the manual, I read that I can use any data frame with the population in the first column and the other columns as loci. If I apply basic.stats to my data frame, I get the following error message:
> basicstat <- basic.stats(a, diploid = TRUE, digits = 4)
Error in data.frame(pop = rep(data[, 1], 2), ind = ind, al = rbind(firstal, :
arguments imply differing number of rows: 356, 236
but my data frame has:
> nrow(a)
[1] 178
> ncol(a)
[1] 8480
>
Thanks a lot!
Maria
--
Maria Guerrina PhD
Università di Genova
DISTAV
Corso Dogali 1M
I - 16136 GENOVA (Italy)
maria.guerrina at edu.unige.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20151113/680ab083/attachment.html>
More information about the adegenet-forum
mailing list