Dear Geoframer, This version works for me:
from rpy import * set_default_mode(NO_CONVERSION) b = r.as_matrix(array( [[1,2,3,4,5],[2,3,4,5,1],[3,4,5,1,2],[4,5,1,2,3],[5,1,2,3,4]] )) c = r.kmeans(b, 2, 5, 1, "Forgy") r.print_(c) I hope this helps, Gábor 2006. December 20. 12.30 dátummal Geoframer ezt írta: > from rpy import * > > class Test: > def as_r(self): > return > [[1,2,3,4,5],[2,3,4,5,1],[3,4,5,1,2],[4,5,1,2,3],[5,1,2,3,4]] > > if __name__ == "__main__": > a=Test() > b=r.matrix(a) > r.kmeans(b, 2, 5, 1, "Forgy") ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list