How to read MNIST database in R?

I'm currently working on a case study for which I need to work on the MNIST database. The files in this site are said to be in IDX file format. I tried to take a look at these files using basic text