I would recommend just downloading the database, which HUGO allows you to do free of charge.
The HUGO website has a "downloads" tab at the top that takes you to the following page
You will see a table of statistics relating to how many protein- or non-protein-coding genes there are catalogued, etc.
Under the tables is a section called Complete dataset download links -- this is the section you want (unless you only want a subset of the data - but why not get it all!)
This plain text file (once uncompressed) can be loaded into R (or any other language) to be parsed and analysed as per your requirements.
It is worth updating the version you download quite regularly, as they update the HUGO database with new/updated info quite regularly.