GithubHelp home page GithubHelp logo

Comments (8)

jgx65 avatar jgx65 commented on June 10, 2024

I'm puzzled, it does for me? (see below). Could you provide an example?

> library(hierfstat)
> data(gtrunchier)
> pairwise.WCfst(gtrunchier[,-2])
          1         2         3         4
1        NA 0.4695425 0.4194788 0.4486061
2 0.4695425        NA 0.7795719 0.7648904
3 0.4194788 0.7795719        NA 0.6321912
4 0.4486061 0.7648904 0.6321912        NA
5 0.3356973 0.5994008 0.5688411 0.5199231
6 0.3992087 0.7563057 0.5308519 0.4776794
          5         6
1 0.3356973 0.3992087
2 0.5994008 0.7563057
3 0.5688411 0.5308519
4 0.5199231 0.4776794
5        NA 0.5065197
6 0.5065197        NA

> genet.dist(gtrunchier[,-2],method="WC84")
          1         2         3         4         5
2 0.4695425                                        
3 0.4194788 0.7795719                              
4 0.4486061 0.7648904 0.6321912                    
5 0.3356973 0.5994008 0.5688411 0.5199231          
6 0.3992087 0.7563057 0.5308519 0.4776794 0.5065197

from hierfstat.

DaniEstevezBarcia avatar DaniEstevezBarcia commented on June 10, 2024

do you add the [, -2] to remove the population column?

from hierfstat.

DaniEstevezBarcia avatar DaniEstevezBarcia commented on June 10, 2024

Also, in the genet.dist option I used a genind object. When changed to hierfstat it works, but I thought it also did with genind (it does actually provide a result but it is different)

from hierfstat.

jgx65 avatar jgx65 commented on June 10, 2024

gtuncatula contains 2 populations column (hierarchical design), the [,-2] is just to remove one of them. With nancycats, the following give me TRUE:

all.equal(mat2vec(pairwise.WCfst(genind2hierfstat(nancycats))),mat2vec(as.matrix(genet.dist(nancycats,method="WC84"))))

from hierfstat.

jgx65 avatar jgx65 commented on June 10, 2024

Note that if you update hierfstat with the current version on github, you won't need the extra genind2hierfstat in pairwise.WCfst (see #56)

from hierfstat.

DaniEstevezBarcia avatar DaniEstevezBarcia commented on June 10, 2024

The new version is not on cran yet right?

Thank you for the answers

from hierfstat.

jgx65 avatar jgx65 commented on June 10, 2024

no, on github

from hierfstat.

DaniEstevezBarcia avatar DaniEstevezBarcia commented on June 10, 2024

Ok, the problem was that the version on cran for some reason was doing something odd with the genind (it did not return error though). With the github version it works.

from hierfstat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.