On May 15, 9:49 am, shahab <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Maybe I am doing something wrong.

Using this interface, you are still in the "python" world. So, things
like the a:b notation do not exist there. You have to use ' quotation
marks (this is then translated 1:1 to a R function call) or address
the R function directly.

Here are your examples:

sage: sage: m = r.cbind(1,'1:7'); m
     sage1 sage0
[1,]     1     1
[2,]     1     2
[3,]     1     3
[4,]     1     4
[5,]     1     5
[6,]     1     6
[7,]     1     7

sage: type(r.median)
<class 'sage.interfaces.r.RFunction'>

sage: r.apply(m,2,r.median)
sage0 sage1
    1     4

[and now back into a sage matrix]

sage: ms = sageobj(m); ms

[1 1]
[1 2]
[1 3]
[1 4]
[1 5]
[1 6]
[1 7]

sage: type(ms)
<type 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'>


Please report any bugs you find, this is a brand new interface and
therefore it is still buggy.

Harald
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to