GithubHelp home page GithubHelp logo

boot.ppfst about hierfstat HOT 6 CLOSED

jgx65 avatar jgx65 commented on June 10, 2024
boot.ppfst

from hierfstat.

Comments (6)

jgx65 avatar jgx65 commented on June 10, 2024

could you send a (small) example reproducing the behavior? Cheers

from hierfstat.

jwwhale avatar jwwhale commented on June 10, 2024

Hopefully you mean the following...
data <- read.genepop("medtest.gen", ncode = 2L)
Converting data from a Genepop .gen file to a genind object...
File description: Mediana_7773SNPs_12Pops
...done.
medtest <- boot.ppfst(data, nboot = 100, quant = c(0.025, 0.975), diploid = TRUE)
Error in i + 1 : non-numeric argument to binary operator
wc(data)$sigma.loc
SNP lsiga lsigb lsigw
M00001 2.566286e-02 3.802011e-03 0.47457627
M00002 6.928440e-02 4.692108e-02 0.34745763
M00003 3.936859e-02 2.079705e-01 0.13131313
...

Then when converting the genind object

data1 <- genind2hierfstat(data)
class(data1)
[1] "data.frame"
medtest<- boot.ppfst(data1, nboot = 100, quant = c(0.025, 0.975), diploid = TRUE)
Error in i + 1 : non-numeric argument to binary operator

from hierfstat.

jgx65 avatar jgx65 commented on June 10, 2024

Sorry, what I meant was a small dataset reproducing the error you are getting. I suspect it is due to some loci being missing for whole populations, but would need to see the data to be sure. Cheers

from hierfstat.

jgx65 avatar jgx65 commented on June 10, 2024

alternatively you can share the data via PM if you can't reproduce the behavior

from hierfstat.

jgx65 avatar jgx65 commented on June 10, 2024

The issue seems to be with your population naming scheme, I have to dig further (I was able to reproduce your error once, but then the function ran smoothly). A quick fix is to rename populations using the following;

data1<-genind2hierfstat(data)
data1[,1]<-as.integer(data1[,1])
data.ci<-boot.ppfst(data1,...)

Will investigate

from hierfstat.

jwwhale avatar jwwhale commented on June 10, 2024

Awesome!! Thanks Jerome!

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.