I am a long time Mac user since back in the days when Photoshop was my favorite software. That was before a noteworthy amount of converts outside the advertising sector turned to Apple. I used a PC before (and do so occasionally too), but that experience does not really qualify.
HTH, to helps to level my view a bit.
Ubuntu is a really good idea. A Virtualbox is nice as Dirk suggests, though the latest KDE can be a little slow (at least on my MacbookPro with 4GB of RAM and sufficient RAM for the box). I do know if its any faster on a PC or with another GUI, but still I can recommend it.If you use it more often you're probably better of with Dual Boot.
For R I use Eclipse with the StatET plugin, which I cherish very much. Especially as a not-so experienced programmer I am able to learn from the source code of other R packages that are always listed in transparent manner in our objects window. For larger dataset I use RMySQL
with a MySQL database.
For code repositories, I started out with Mercurial and never experienced any Mac related trouble. There is even an easy to install binary on their website. Plus I recommend this tutorial from Joel Spoelsky (not mac related).
For LaTeX, there is TexShop on a Mac, which an lightweight but stable editor. If you work with references and a lot of quoting I recommend to use BibDesk. It's a GUI to manage your bibtex entries. Just for the sake of pseudo-completeness, I mention WYSIWYG Latex Lyx for Mac.
I even use Texclipse, particularly if I work with R and Sweave.
You haven't asked for it, but i can't help myself, here's some free stuff that might interested you if you really choose to buy a mac:
- textwrangler (free editor, my standard texteditorm nice highlighting for many languages, starts quicker than Eclipse ;), also able to use plugins)
- Kod (another (free editor)
- subethaedit (another texteditor)
- Gmote (if you use an android mobile you can use it as a remote touchpad)
- SequelPro (nice MySQL GUI, heads and shoulders above of MySQL workbench)
- pdfsam (merge and split .pdfs)
That being said. Try Linux if you are into programming and even more so if you are into learning programming. From what you write, I feel you will get in touch with an environment that you like (tech and people wise). The more I think about it, I am still a mac user because of the Adobe products and because it's not a disadvantage for programming (at least for my (low) skill level).
EDIT:
I also tried Komodo edit (as an R editor) for a while, which is also nice, but was a bit unstable sometimes.
EDIT2:
Thx man, here is TextMate .