-
Notifications
You must be signed in to change notification settings - Fork 28
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
gratia::derivatives: "Subscript out of bounds"-error on bs="fs" model #57
Comments
With your code I see this:
with the current version on github (not CRAN). This is because an internal function used by So, yes, this is a bug. |
Thanks for informing me about this @tomand-uio. I have now fixed this issue in the latest commit to the github version. |
?Dear Gavin,
Thank you for the swift and informative reply. I'm looking forward to an even better version of gratia with a solution to this. And thank you for your contributions to the R community and for continuing to write great papers (and a superb blog which I follow avidly)
Best regards,
Tom
________________________________
From: Gavin Simpson <notifications@github.com>
Sent: 06 December 2019 17:45
To: gavinsimpson/gratia
Cc: Tom Andersen; Author
Subject: Re: [gavinsimpson/gratia] gratia::derivatives: "Subscript out of bounds"-error on bs="fs" model (#57)
With your code I see this:
dm <- derivatives(m)
Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, :
'min' not meaningful for factors
with the current version on github (not CRAN). This is because an internal function used by derivatives() to generate data at which to compute the derivative is treating the spline as 2-d and trying to generate a sequence over the factor specified in the smooth.
So, yes, this is a bug.
-
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#57?email_source=notifications&email_token=ALWEYTFJD2ECSEYFHXOTZG3QXJ6SFA5CNFSM4JWOHZN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGEVK5Y#issuecomment-562648439>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALWEYTGU4QJH6PW4XPBKHGDQXJ6SFANCNFSM4JWOHZNQ>.
|
Following up on this bug. I found a secondary issue with using
This returns the following error:
I think the issue comes from |
@mahonmb Confirmed in my latest GitHub version. Will start a new issue for this. |
Thanks for the report @mahonmb; this is now fixed in the GH version |
Thanks, @gavinsimpson! Looking forward to using it. |
I am trying to use hierarchical GAMs for analyzing microalgal growth curves in 96-well plates, so I fit a "S-type" GAM (cf. Pedersen et al. 2019) and want to extract derivatives to calculate growth rates. The following code shows an example that leads to the error message "Error in .subset2(x, i) : subscript out of bounds" when I try to apply derivatives() to the GAM object.
I can imagine that one possible answer could be that this was never supposed to work, in which case I guess I'll use som combination of predict() and lapply() or similar produce rates of change for each unit. Or maybe I have just misunderstood something, and there is already a simple way to get this right? Or maybe it's an actual bug...
The text was updated successfully, but these errors were encountered: