fitzLab-AL / gdm

R package for Generalized Dissimilarity Modeling
GNU General Public License v3.0
33 stars 12 forks source link

Specifying non-equal spline numbers across variables breaks plot() and isplineExtract() #14

Closed sponslerdb closed 2 years ago

sponslerdb commented 3 years ago

When I specify non-equal numbers of splines for the variables in my model, the model call itself seems to run correctly, but both plot() and isplineExtract() throw "subscript out of bounds" errors. I would presume this is because these functions are expecting equal dimensions across variables and then trying to access rows that don't exist.

gdm_WN6 <- gdm(sitepair_WN, geo = FALSE, splines = c(6, 4, 5, 6, 6))

plot(gdm_WN6)

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'plot': subscript out of bounds
fitzLab-AL commented 2 years ago

Yes, that would be a problem. I will look into a fix.

fitzLab-AL commented 2 years ago

@sponslerdb I think I have fixed these issues, but let me know if you run into problems.