Hi, I was trying get the rpy to work but was stuck. Would you help us with these simple rpy commands?
I did the following: python from rpy import r x = r.matrix(r.rnorm(100), 50, 2) r.kmeans(x, 2) The error was: Traceback (most recent call last): File "<stdin>", line 1, in ? rpy.RException: Error in as.double.default(x) : (list) object cannot be coerced to 'double' I also tried: x = numpy.array(x) before r.kmeans but it didn't work. I was able to run the same thing in R by doing: x = matrix(rnorm(100), 50, 2) kmeans(x, 2) But the test with rpy failed miserably ... Any idea to help out? Thanks, -Ding. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list