3 ms·
...and at the end he shows you how to do the same thing with two lines of R. It's very useful to code basic statistical algorithms yourself so you understand h
by gammarator 14y ago
...and at the end he shows you how to do the same thing with two lines of R.
It's very useful to code basic statistical algorithms yourself so you understand how they work, but for any serious analysis you'll get more reliable and performant results with a library.
- S4M 14y agoTotally agree. And if you want to call R from ruby to export the analytics to a web page for example, there are many options, such as this one: https://github.com/clbustos/Rserve-Ruby-client https://github.com/clbustos/Rserve-Ruby-client
- ucsd_surfNerd 14y agoThat is exactly what I was going for. Basic algorithm yourself to help people understand the math but you wouldn't want to use this code in a production system. In fact I perform the vast majority of my statistical analysis in R. Ruby is just a fun language to implement basic statistical algorithms in and it the Ruby community as a whole doesn't hasn't put a lot of emphasis on stats.