You are viewing a read-only archive of the Blogs.Harvard network. Learn more.

Missed Mislabeling Mistake

ø

In the process of function-ifying my R script, discovered a disconcerting inconsistency that caused me to go back and work through a lot of code again (esp. the stuff dealing with the d-matrix), fearing that I may have goofed up most of my analyses altogether. However, eventually (!) figured out the bug came from a mistake in assigning row names to the d matrix, and the PCO results, somewhere along the line. This is of course exactly the reason for going through the process of turning this into functions—once the process is tied up in a function, there’s no accidentally applying the wrong set or order of row or column names to a matrix. Or, at least, it’ll be consistently wrong…

I eventually, I think, figured it out. While there were other distractions (another Geobiology meeting I couldn’t quite get out of—well, it ended up being fairly entertaining, at least), I also made some good headway turning my code into functions. This inspired me to use my new “plotMS2D()” function in a loop, to make plots of all (!) character states—I think this will actually be tremendously useful for deciding which characters are responsible for the morphospace, and which are just randomly peppered all over the place. It looks like this:

previous:
Rewriting R before GRD
next:
These Weekends Are Getting Exhausting

Comments are closed.