4GB is tons of RAM. You do not have to be contemplating "lightweight" distros at all. A large project is a large project, but I am a little bit curious as to why you believe that working on one requires a correspondingly large amount of RAM, because generally it does not. I have done R on R stuff in the past and I know that is not resource light but it does not require a bunker with a mainframe in it either.
I have 4 GB on my quad core 3.6 Ghz i5 desktop running fedora and KDE, which KDE is generally acknowledged as the fattest linux desktop going, since it relies on Qt and C++ libraries. I have that configured for 9 workspaces and reguarly work on things involving java + perl + javascript (there's a fat stack), etc, or android, which requires even more java busyness and an ARM emulator(!); doing that with gvim + eclipse(!) + firefox + this + that (and sometimes I'm editing images in gimp on the side for my own purposes and leave that open) and you know what? I still can't exhaust the RAM; the swap usage is ALWAYS 0. Occasionally it gets close, but a huge portion is cache. Of course, the more cache the better, so the more RAM the better, but honestly: get the laptop first and then rethink.
The only people who need more than 4gb on a single user linux system are people who have done something ridiculous, are playing video games, are running multiple virtual boxes plus playing video games plus doing something ridiculous -- not software developers. I'd almost love an excuse to run out and buy another 4 GB -- after all it is cheap, and I have more empty slots on the motherboard, and then I could say wow, an 8 GB system! But the truth is half of that would never get used, so there is no point.
Just pick a distro. Pick any distro. Go crazy.