bug in "physignal.z()" geomorph 4.0.10

15 views
Skip to first unread message

Stylianos Koutalis

unread,
Jun 1, 2025, 9:04:13 AMJun 1
to geomorph R package

Dear all,

Today I encountered a potential bug that did not occur last year. When running the physignal.z() function with univariate data, Csize for various Species (using the "front" lambda optimization) in the form of an [n, 1] matrix, I received the error: "Error in Y[d, ] : incorrect number of dimensions". 

This error did not occur with the same script and data in a previous analysis. The physignal() function still works fine on the same univariate input. To work around the issue, I duplicated the univariate data as a second column - new.matrix <- cbind(data, data) - and then ran physignal.z() (using "front" lambda optimization again), which reproduced my original results.

I'm reporting this as a possible bug since the behavior has changed. Thank you very much for your time and attention!

Best regards,
Stelios

Mike Collyer

unread,
Jun 1, 2025, 11:43:45 AMJun 1
to geomorph R package
Dear Stelios,

I believe if you update both RRPP and geomorph from Github (addresses in description files), this issue has already been addressed.  It was caused by R converting a single-column matrix into a vector, even after it was established as a matrix.  (This appears to be due to recent R updates, not the physignal.z function.)  This is why your fix worked because it forces R to retain a matrix.  We added a line of code to assure retention of a matrix, so it should work now.  Please let us know after updating if still does not work.

Best,
Mike


--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/geomorph-r-package/8971e4d5-6775-46c5-8824-41e3c2f6f30dn%40googlegroups.com.

Stylianos Koutalis

unread,
Jun 2, 2025, 3:05:19 AMJun 2
to geomorph R package
Dear all, dear Professor,

Thanks for the clarification!! I updated both packages directly from GitHub, and it works just fine. It seems that last week, when I updated RRPP (not geoMorph though), I didn't update some dependencies, or failed to update them, and didn't pay attention, so this could be what wouldn't allow the fix to apply. In any case, thank you very much for your time!!

Best,
Stelios

Reply all
Reply to author
Forward
0 new messages