I have been programming for about a year and I am really interested in data analysis and machine learning. I am taking part in a couple of online courses and am reading a couple of books. Everything I am doing uses either R or Python and I am looking for suggestions on whether or not I should concentrate on one language (and if so which) or carry on with both; do they complement each other?      -- I should mention that I use C# in school but am familiar with Python through self-study.
R vs Python for data analysis
python;machine learning;r
I use both Python (for data analysis ofcourse including numpy and scipy) and R next to each other. However, I use R exclusively to perform data analysis, and Python for more generic programming tasks (e.g. workflow control of a computer model).  In terms of basic operations, say operations on arrays and the sort, R and Python + numpy are very comparable. It is in the very large library of statistical functions that R has an advantage. In addition, matplotlib does not seem to be as good as ggplot2, but I have not used matplotlib that much. In addition, I would focus first on one language and become good at the specifics of that. You seem to be primairily interested in data analysis, not software engineering. I would pick R and stick to that. That said, I think choosing for Python + numpy + scipy + scikit is defintely and excellent choice, it is just that I feel that R is just a bit more excellent.I would also take a look around you what your colleagues and other people in your field are using. If they all use, say, Python, it would make sense to stick to that in order to more easily learn from them and exchange code.Disclaimer: Note that I am a heavy R user, so my opinion might be biased, although I have tried to keep my answer as objective as possible. In addition, I have not used Python + numpy extensively, altough I know collegaues who do all their data analysis in it.ps: This link might be interesting: http://seanjtaylor.com/post/39573264781/the-statistics-software-signalpps: or this quote from this post:I use R and Python for all my research (with Rcpp or Cython as  needed), but I would rather avoid writing in C or C++ if I can avoid  it. R is a wonderful language, in large part because of the incredible  community of users. It was created by statisticians, which means that  data analysis lies at the very heart of the language; I consider this  to be a major feature of the language and a big reason why it won't  get replaced any time soon. Python is generally a better overall  language, especially when you consider its blend of functional  programming with object orientation. Combined with Scipy/Numpy,  Pandas, and statsmodels, this provides a powerful combination. But  Python is still lacking a serious community of  statisticians/mathematicians.