Although I'm VERY far from being skillful F# programmer, I am slowly moving forward.
Not far ago I implemented one of the measures of association in R - Somers' D.
Somers' D is sometimes used for testing concordance of internal and external risk scores / rankings.
I had some problems with finding the right formula for Somers' D Asymptotic Standard Error, and when I finally found the solution I didn't have much energy to clean up my R code ;)
I thought, using this dirty code as a base for Somers' D implementation in F# may bring interesting results. My intention was not to give R too large a head start over F#.
Still, the differences are visible in many places...
First of all, I have been pretty surprised that basic matrix operations are not available in the core F# version.
It is necessary to add F# PowerPack to work with matrices.
Even then, working with matrices in F# does not seem so natural as in R (or Matlab). Or, probably, I still know too little about F#.
A couple of examples:
constructing matrix in R:
constructing matrix in F#:
calculating WR/DR in R:
calculating WR/DR in F#:
Later it gets a little better, but...
'A' function in R:
'A' function in F#:
As I've mentioned at the beginning of the post - both codes are "dirty". Also, I definitely know R better than F# (even if it may not be apparent from the R code above ;)
Still, F# seems to require more coding and many "simple" operations (matrices...) may not be so easy in F# in comparison to R.
I'm still to find where F# excels :)
[ dirty R code ]
[ dirty F# code ]