Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little bug in "burnin.R" #27

Open
pglpm opened this issue Oct 7, 2021 · 0 comments
Open

Little bug in "burnin.R" #27

pglpm opened this issue Oct 7, 2021 · 0 comments

Comments

@pglpm
Copy link

pglpm commented Oct 7, 2021

If the x input is a vector whose length is not an integer multiple of 10, the function will give an error. the problem is on line 16 (https://github.com/LaplacesDemonR/LaplacesDemon/blob/master/R/burnin.R): x was transformed into a 1-column matrix, and on line 16 it is inadvertently transformed back into a vector, which causes problems when BMK.diagnostic is called. Line 16 should be changed from

if(n %% 10 != 0) x2 <- x[1:(10*trunc(n/10)),]

to

if(n %% 10 != 0) x2 <- x[1:(10*trunc(n/10)), , drop=FALSE]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant