R package to prioritize cells in a grid