0

As I understand there are languages that are excellent for mathematics, statistics and analysis.

I'm getting into Data Science, and the language that keeps popping up is R. Does Microsoft have a language similar to R? I come from a C# background. I develop applications in C#, so it would be nice to have a language similar to R that I can use in my current C# projects for data science and data analysis related tasks.

Does such a language exist?

pnuts
  • 58,317
  • 11
  • 87
  • 139
James Jeffery
  • 12,093
  • 19
  • 74
  • 108
  • I haven't heard of anything resembling "R#", but eh. That seems the most obvious name (even though it semi-clashes with "Resharper", a VS add-in). – cHao Dec 30 '13 at 15:04
  • 7
    R can call cpp. Dunno specifically about c#. But why on earth are you looking for a Redmond-based language? – Carl Witthoft Dec 30 '13 at 15:04
  • I'm not specifically looking for a Redmond-based language. I'm looking for a language, ideally a Microsoft language, that is suitable for Data Analysis and Mathematics. – James Jeffery Dec 30 '13 at 15:05
  • There's always automation with Excel... :) – cHao Dec 30 '13 at 15:07
  • @cHao I'd rather not go backwards lol. I'll be dealing with huge datasets that often contains mixed data. I need a language well suited to data analysis - ideally without having to learn a new one (such as learning R) - to correlate the data. – James Jeffery Dec 30 '13 at 15:11
  • I don't know if @cHao is being sarcastic, but Excel is not the best tool for harcore data analysis. I also come from a Java/C# background and I'm now an R user. I suggest you dive in as soon as possible - R is great! – SavedByJESUS Dec 30 '13 at 15:12
  • You're aware that using *any other language* to work with the data, will by definition involve learning another language, right? I'd suggest you just suck it up and learn R. At the very least, you'll be using a language that a not-insignificant number of other people use, know, and most importantly, can help you with when/if you have trouble. – cHao Dec 30 '13 at 15:12
  • I don't know why you are specifically for a Microsoft language, but as you have a programming background it shouldn't be to hard to learn R. I have no programming background and was able to use R within 2 months. It's a great language for data analysis and there is an active community around it (among others over here @ SO). – Jaap Dec 30 '13 at 15:16
  • 2
    A more relevant question/search target might be for convenient R <-> C# pipelines and interfaces ... – Ben Bolker Dec 30 '13 at 15:17
  • An alternative to R might be Python with the Numpy, Scipy & Pandas libraries. – Jaap Dec 30 '13 at 15:18
  • @SavedByJESUS: It was about 90% sarcasm. Excel can do pretty charts and stuff, and can be useful for little bits of data, but yeah -- probably not the best choice for data sets over a few thousand rows in any case. – cHao Dec 30 '13 at 15:18
  • @Jaap I think it's a bit different. Coming to R from another programming language may present a few challenges that wouldn't come up otherwise. One of those in the concept of vectorization. – SavedByJESUS Dec 30 '13 at 15:24
  • @SavedByJESUS given that MatLab, c, python, and FSM knows which others all support vectorization, your comment is a bit slack. – Carl Witthoft Dec 30 '13 at 15:35
  • @CarlWitthoft Sorry. I come from a Java/C#/Visual Basic background. I didn't know these other programming languages used vectorization. – SavedByJESUS Dec 30 '13 at 18:34
  • 1
    Dupe? http://stackoverflow.com/questions/1557507/what-is-a-good-statistical-math-package-for-net – mdsumner Dec 30 '13 at 22:33
  • Your question is very broad. If you want the benefits of R you will need to learn a bit. To keep your C# assets I suggest you look at interop with http://rdotnet.codeplex.com and http://rclr.codeplex.com (formerly http://r2clr.codeplex.com). There are SO posts with tags R, C# and/or .NET that give more detailed answers some references to these libraries, e.g. http://stackoverflow.com/questions/12410528/calling-net-c-from-r – j-m Dec 31 '13 at 21:21

1 Answers1

1

SAS is the 800 lb gorilla in that market, but it's expensive and it's C# integration is limited to using C# to drive the SAS system (basically tell SAS to process a file, then output the results, then read those results). As already mentioned in the comments R has C++ bindings, which can be used via interop in C#. MS supplies F# which can be very useful for that sort of work (and interfaces naturally to C#). One place to look is http://research.microsoft.com/en-us/ they always have lots of stuff going on and might provide something that would be useful. Also LINQ in C# provides some primitive functionality (sums, averages, that sort of thing) and can be easily extended.

Dweeberly
  • 4,668
  • 2
  • 22
  • 41