typodupeerror
DEAL: For \$25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

## Comment Re:eeebuntu (Score 2, Informative)466

I'll second that. I've been using eeebuntu base on my 901 happily enough, battery life seems to be about 5 hours.

## Comment Re:Show me some example code (Score 1)382

Well, I haven't used MATLAB itself for a while - I do use Octave a bit though. So, try this

a = sin

In Octave I get

error: sin: too few arguments

a = @sin

whereas the equivalent,

a <- sin

works in R. In other works, functions look just like other kinds of data in R, but a bit different in MATLAB (not much admittedly)

Another difference, I think, is the way that scope works. Example: a function which, given n, returns a function which increments n (Paul Graham's incrementor exercise)

f <- function(n){
function() {
n <<- n + 1
n
}
}

g <- f(2)
h <- f(-3)

g()
#returns 3
h()
#returns -2
g()
#returns 4
h()
#returns -1

Can you write this function, easily, in MATLAB?

## Comment Re:Octave is more an alternative to MATLAB (Score 1)382

Octave is great if you are moving from MATLAB to a free tool, because it has a similar syntax (IIRC it lags the MATLAB launguage by a couple of versions). But, in my view at any rate, R has a nicer language than either, and was well worth learning. You're right that R is stats oriented, but not some much that you feel crippled by it in use.

## Comment Re:Show me some example code (Score 2, Informative)382

note that the minus (as in f - function...) signs should be (left angle bracket minus sign), that is, the R assigmnent operator, I guess this is the lameness filter

## Comment Re:Show me some example code (Score 5, Informative)382

I use R a great deal. Think of it as an alternative to MATLAB, or Excel, rather than C or perl or lisp or whatever you like to use as a general purpose language. So, compared to MATLAB, functions are first class objects (rather like lisp), so, you can write functions that take functions as arguments, and return them as well, just as though
they were simple variables. It handles
vectors rather easily, and has decent plotting tools.

#quick example

# function, which, given numerical arguments a and b, and a function g, returns a function of x
f - function(a,b, g){
function(x){ a * x + g(b * x)}
}

f1 - f(1,2.5,sin)
x - seq(-pi,pi,l=100)
plot(x,f1(x),type='l')

## Submission + - Microsoft uses legacy formats to push OOXML (bbc.co.uk)

kazade84 writes: The BBC reports that we will lose access to data stored in legacy formats as we move to newer standards. The National Archives have made a deal with Microsoft to set up virtual machines running old versions of Windows and Office to access the legacy files to prevent them being lost forever.

The report, although interesting, seems like another marketing attempt by Microsoft to push OOXML as a 'standard' format and makes me wonder why these legacy files aren't just converted to ODF?

# Slashdot Top Deals

Advertising is a valuable economic factor because it is the cheapest way of selling goods, particularly if the goods are worthless. -- Sinclair Lewis

Working...