Hi all, here is my problem,

 in R, i can do :
a = matrix(c(1,2,3,4,5,6,7,8,9),ncol=3)  #a matrix
> a                                      
     [,1] [,2] [,3]                      
[1,]    1    4    7                      
[2,]    2    5    8                      
[3,]    3    6    9                      

> a[dim(a)[1]:1,]          #the result i expect
     [,1] [,2] [,3]
[1,]    3    6    9
[2,]    2    5    8
[3,]    1    4    7
>


while using rpy , let be :

dimension = sqrt(4**((int)(options.lgMot))) # dimension=16
tmp = r.matrix((1-sigcomp), ncol=dimension) #ok, so now i want to 'flip' the 
matrix  (sigcomp is a vector)

so i tried :


tmp = tmp[dimension:1,]  ==> tmp equals []


tst = r(matrix(tmp, ncol=dimension))

Traceback (most recent call last):
  File "./signature.py", line 85, in <module>
    tst = r(matrix(tmp, ncol=dimension))
TypeError: __new__() got an unexpected keyword argument 'ncol'


i can't find documentation about an R'lish way to access array in rpy, is there 
one ? what did i miss? (using rpy is more likely to help me for the future)


Regards


-- 
-----------------------------------------------------------------------------------------------
        Ludovic MALLET
        Équipe Molécules thérapeutiques in-silico (MTi)
        Université Paris-Diderot - Inserm U973
        Bâtiment Lamarck - 5ème étage, bureau 501
        35 rue Hélène Brion - 75205 Paris Cedex 13
        tel: 01 57 27 83 91
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to