Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:R sucks as a language (Score 2, Informative) 382

by tmoertel (#26367041) Attached to: The Power of the R Programming Language

The R language is optimized for writing statistical code. It's going to seem a little weird, especially if you have a traditional programming background. Once you spend some serious time writing R code, however, you will probably begin to appreciate many of the things that initially seemed odd.

For example, consider the way R handles function calls:

  • It allows you to pass function arguments by name and abbreviate the names, which is handy during live sessions when you want to call statistical routines that have lots of arguments (which is common).
  • During a function call, arguments are bound lazily, which lets you pick apart the expressions behind them and write functions that serve as control-flow constructs. This lets you do things such as pass model expressions as arguments.
  • Also, function arguments can have default values, which are again evaluated lazily but can also see values within the scope of the function body. This lets you use computed values as defaults and have those values depend on other arguments, which in most programming languages requires extra work on your part.

All of these "oddities" serve to reduce the amount of boilerplate code you need to write when coding up statistics routines. (Click the link above if you want to see examples and take a more in-depth tour of R's fascinating and time-saving function call behavior.)

Money may buy friendship but money cannot buy love.

Working...