Is writing a R package equivalent to a journal paper or PhD thesis chapter? I am a PhD student in Management, at Autonomous University of Barcelona. 

While working on my thesis, I found that there is no piece of code or software related to a specific but important topic of efficiency analysis and benchmarking. I am really eager to invest part of my time and write a package in R in order to help other researchers as well as deeply learning the topic through coding. Moreover, when I publish my paper I can motivate interested researchers to use that piece of code and re-evaluate my work or extend it. 

Now my question is whether writing such package equivalent to a chapter of thesis /a scientific paper. Based on the answer, I will decide whether to work on it right now or to defer doing so. 

I will be grateful for any help you can provide.
Writing useful software is not equivalent to writing and article or a thesis chapter (which are generally not equivalent to one another either).  It may, however, be equally valuable for your career, depending on what you want in your career.

The real question is whether people will find it highly valuable.  If they will find it valuable, then it can be worth something to you.  If you want it to readily count towards a conventional academic career, then after the software is done you can write a journal article about it, and people can cite that.  If you search for "analysis software" in Google Scholar, you'll find many highly cited works of this sort, showing that it is certainly possible, even if not the straightest and most conventional road to take.