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.
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.