Bugs item #1602142, was opened at 2006-11-24 08:15
Message generated for change (Comment added) made by jchang
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453021&aid=1602142&group_id=48422

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: rpy
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: none (whatsoever)
Assigned to: Gregory Warnes (warnes)
Summary: Problem to convert numeric array into matrix 

Initial Comment:

I'm working with a programm that converts a numeric array into a r-matrix.
In some R and Python versions it runs fine (e.g. python 2.4.3 and R 2.1.1)

In some versions ( e.g. R 2.2.3) the array is converted into a matrix with one 
column containing lists in each cell.

I'm using the module Numeric to create the array.

I solved this by converting the array into a vector and create a matrix with 
the number of rows of the array, but slows down the method.

My question:
Is this solved in the newest rpy-version or solved in any other way? 






----------------------------------------------------------------------

Comment By: Jeffrey Chang (jchang)
Date: 2007-08-30 20:04

Message:
Logged In: YES 
user_id=12576
Originator: NO

I believe I am seeing this too.  I am unable to create matrices in R. 
This is on rpy 1.0RC3, R 2.5.1, python 2.5.1.

I do not understand the workaround described above, so am unable to test
whether that works on my setup.



>>> M = rpy.r.matrix([1, 2, 4, 5], 2, 2)
>>> M
array([[1, 4],
       [2, 5]])
>>> rpy.r.print_(M)
NULL
>>> rpy.r.print_(rpy.r.dim(M))
NULL
>>> rpy.r.print_(rpy.r.dim([[1, 2], [3, 4]]))
NULL
>>> rpy.r.print_([[1, 2], [3, 4]])
[[1]]
[1] 1 2

[[2]]
[1] 3 4

[[1, 2], [3, 4]]
>>> rpy.r.print_(rpy.r.length([[1, 2], [3, 4]]))
[1] 2
2
>>> rpy.r.print_(rpy.r.mode([[1, 2], [3, 4]]))
[1] "list"
'list'
>>> 


----------------------------------------------------------------------

Comment By: Gregory Warnes (warnes)
Date: 2006-11-27 14:32

Message:
Logged In: YES 
user_id=9316
Originator: NO

These conversions should happen properly for all versions of RPy and R. 

What platform and version of RPy are you using?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453021&aid=1602142&group_id=48422

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to