ttimbers / MWT_Locomotion_summary_analysis

Other
1 stars 2 forks source link

size and pathlength violin plots - updated (May 19) #4

Closed quintinm-dev closed 9 years ago

quintinm-dev commented 9 years ago

I added to the end of extract.col so that it also changes the time factor to numeric - that way we don't have to call it in every function (don't think we ever need it as a factor).

I'm happy with the violin plots for area, length and width.

For the pathlength violin plot, my function for finding the pathlength works well, but I'm not too happy with my implementation for aggregating the data by pathlength.

Right now, I'm aggregating the data with an arbitrary function (max), and then replacing the arbitrary values with actual pathlengths (found by pathlength function). It works, but it relies on the "by" and "aggregate" functions to group in identical order - which they seem to do right now (once I drop the NA values from by).

Maybe you can suggest a better way to aggregate the data with the new pathlengths - I had trouble using ddply from plyr.