Hi Shahab,
disclaimer: I have never used R.
But hopefully my remarks make sense.
On May 15, 9:49 am, shahab <[EMAIL PROTECTED]> wrote:
> x = r.cbind(1, 1:7)
> gives me a syntax error and
It complains about the colon in "1:7". Do you mean "1/7" or "1.7"?
Both work:
sage: x = r.cbind(1,1/7)
sage: x
sage6 sage5
[1,] 1 0.1428571
sage: x = r.cbind(1,1.7)
sage: x
sage3 sage2
[1,] 1 1.7
> y = r.apply(x,2,median)
>
> tells me
> NameError: name 'median' is not defined
I guess you forgot the quotation marks around median:
sage: y=r.apply(x,2,'median')
sage: y
sage3 sage2
1.0 1.7
Cheers
Simon
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---