Move to dplyr for efficiency.

Also refine sampling in pixel_data subsample method.