ttimbers / MWT_Locomotion_summary_analysis

Other
1 stars 2 forks source link

size and pathlength violin plots #3

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.

Maybe you can suggest a better way to aggregate the data with the new pathlengths. I know some people use the plyr package, but I don't know if you want it to have extra requirements.

quintinm-dev commented 9 years ago

Just realized Catrina already uses plyr in the speed function - going to try to improve pathlength implementation using plyr.

Update: No progress.