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

Error in ...names() : could not find function "...names" #20

Open
mgzjys opened this issue Nov 1, 2021 · 3 comments
Open

Error in ...names() : could not find function "...names" #20

mgzjys opened this issue Nov 1, 2021 · 3 comments

Comments

@mgzjys
Copy link

mgzjys commented Nov 1, 2021

Hello developers,

Thank you for the wonderful work! I am trying to use your package but was faced with some issues. I installed the package and then run the demo code below:

library(fmcmc)
set.seed(78845)
n <- 1000
X <- rnorm(n)
y <- 3.0 + 2.0*X + rnorm(n, sd = 4)

ll <- function(p, X., y.) {
  
  joint_ll <- dnorm(y. - (p[1] + X.*p[2]), sd = p[3], log = TRUE)
  joint_ll <- sum(joint_ll)
  
  if (!is.finite(joint_ll))
    return(-Inf)
  
  joint_ll
}

set.seed(1215)
ans <- MCMC(
  ll,
  initial = c(0, 0, sd(y)),
  nsteps  = 5000,
  X.      = X,
  y.      = y
)

However, it gave me an error said "Error in ...names() : could not find function "...names"". I am using R 4.0.2 with RStudio to run the code. Can you help me with this? Thank you very much.

@gvegayon
Copy link
Member

gvegayon commented Nov 1, 2021

That happens because the function ...names() was introduced in R 4.1.0. I've changed the code so that it avoids using that function. Try it again and let me know.

@kurokirasama
Copy link

kurokirasama commented Dec 2, 2021

Hello, I have the same issue in both R package and git hub version... I'm using R version 3.6.3 in Ubuntu 20.04

@kurokirasama
Copy link

nevermind... i updated to R 4.1.2

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

3 participants