Is writing a R package equivalent to a journal paper or PhD thesis chapter?
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.