-
Notifications
You must be signed in to change notification settings - Fork 17
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
Can't run pMincApply example code: object 'fun' of mode 'function' was not found #299
Comments
Having not looked into this yet, I wonder whether we still support the rather hackish quote(...(x)) syntax or whether it should just be |
We have tried both. The error is identical. |
I have reproduced this behaviour with R 3.6.x and develop RMINC which otherwise passes the test suite. However,
works correctly. If there's some other option combination without using Also, where in the documentation have you found this example? The test suite doesn't test pMincApply with |
I didn't know to try
The first entry in examples here, https://rdrr.io/github/Mouse-Imaging-Centre/RMINC/man/mincApply.html |
Made some minor updates to the source documentation in 807ffc5, which should be reflected downstream after the next release (when we regenerate the docs). |
Sorry to follow up again, we're having new issues with pMincApply and I'm not sure what to do The goal here is to attempt to solve #298 by writing our own code. plslmer <- function(x, data) {
mydata = cbind(data,x)
eff = coef(lmer(x ~time_month + (time_month||Id), data = mydata,REML = T, lmerControl(optimizer ="Nelder_Mead")))
return(c(eff$Id$`(Intercept)`,eff$Id$time_month))
}
testrun <- pMincApply(data$jacobians, plslmer, workers = 4
, local = T, tinyMask = T, global=c("data","plslmer")) But we get this: |
I think pMincApply expects a single-argument function; assuming your handling of the coefficients is correct, what about
although I'm not sure exactly how this interacts with |
Sadly your suggestion produces the same error. |
So in order, I would try: (i) look for more informative errors in the log files; (ii) try mincApply instead to see if this fails in the same way; (iii) create a reprex we can look at. |
I will try and look at this tonight/tomorrow. A reprex would be handy, but if I think there's enough in this thread to get a handle on what you're trying to do even without one. |
I've tried to generate a reproducer using the test data and been unable to. Looking into how to provide a pared down dataset. |
The text was updated successfully, but these errors were encountered: