I have been making a package to upload to CRAN, but I have a little trouble.
If you go to the website, https://github.com/elflacosebas/migraR, you will find the package.
You can run the example to test it.
The problem comes when I want to avoid the attach and perform the best_migramod function. Then, it will use inside fit_migramod, which uses a class named Migramodel.
You can run the example now without the line codes below:
colnames(data1) <- c("x","y")
attach(data1)
The error I get says:
Error in eval(.self$expr, c(as.list(p), as.list(data))) :
object 'x' not finded
I have tried using attach and detach to solve it into the best_migradmod function but it doesn't work. I understand it is a matter of environment as this post says as well.
Error in eval(expr, envir, enclos) : object not found
Where shoud I put the attach? or the other operators, or should I modify the data file? or
Thanks a lot for the hint!!