I've also just purchased an M15 r7, I too was experiencing less than 2 hours battery life. I've disable the discreet gpu from the bios and have seen a huge increase in battery life. Also tweaked the maximum processor state in the power plan to 50%. However this is at the sacrifice of performance, but you'll see huge gains. Google this and watch the youtube videos.  Also what is your idle cpu temp? Since changing the above mine previously was 70c and now it idles nicely at 48c with light browsing & checking emails.   For example now, I am running on my battery with 78% left and I've already been using it for 45 minutes and the battery says 3 hours 15 minutes left. So I would hope 4 hours is what I get. I'm trying to get more! Definitely worth giving the above a go, even to increase the longevity of your M15 r7.
I just got my m15 R7 two weeks ago, and my battery barely lasts two hours doing battery saver and having brightness and keyboard lights off and doing no gaming or streaming. Is it supposed to be like this or is something wrong? I’ve seen reviews and such where people said it should last you at least four hours doing normal work. 
m15 R7, battery life two hours