@josh1 bhai I think I got it.
It is missing a referrer, that is it wants you to go to its parent page first, then download link.
Following is now working.
Code:
curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" -e https://www.nseindia.com/products/content/equities/equities/homepage_eq.htm --url https://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm02JAN2019bhav.csv.zip -o cm02JAN2019bhav.csv.zip
Just need to add it in .r file.
CURL works even without the -H option but -e is mandatory.