Added function to compare dicts to be sure R and Python scripts generate the same data.