views:

1141

answers:

2

Has anyone tried both J programming language form jsoftware and R language. After some search I faced incanter which is based on clojure. I want to learn a statistical language for data analysis. Which one do you prefer? Why?

Please consider conditions below, thanks.

  • productivity
  • performance
  • community
  • library
  • syntax
+5  A: 

A question similar to this was asked recently on the J forum. This was my answer:

I don't know R anywhere as well as I know J, but given that disclaimer here are my impressions:

J

  • strong mathematical focus
  • conceptual framework for working with array data is very general, consistent and well thought out.
  • code is succinct/terse
  • object-oriented paradigm available but optional

R

  • strong statistical focus
  • object-oriented paradigm is pervasive
  • mature/powerful plotting and graphics
  • larger user base
  • many user-contributed packages available
  • syntax for entering/manipulating arrays seems clumsy
  • code is relatively verbose
  • more accessible and extensive documentation

If my major focus was statistical then I think R would be the obvious choice. However I find J's data manipulation features to be both simpler and more powerful. So my current have-my-cake-and-eat-it-too solution is to use J for creating and manipulating data, then use its Rserve interface to access features/packages from R as required. However so far my R usage has been "light".

TikkaNZ
+3  A: 

productivity

library

Productivity is much related to the accessible libraries for the given task. If it's all about statistical calculation, R has an obvious win thanks to its huge variety of libraries. However, when you have to manipulate/mingle data J can be easier to handle and it will become much, much easier as you get more skilled in J programming.

However, you can have both worlds using R interfaces in J.

performance

R is infamous for its poor performance. You shouldn't overuse for-loops either in J or R, though. J's got decent performance. Moreover, J code is usually terser and hence easier to change/rewrite/optimize/come up with a new algorithm. I find "coming up with a new algorithm" a big win.

community

R's community is huge compared to J's. However you have the pros and cons. Imagine the pros and cons living in a small, friendly village and in a big city.

syntax

J's syntax is surprisingly consistent compared to R's. The predictability is very high once you learned the principles.

June Kim