On 3 April 2012 at 15:31, Niek de Klein wrote: | Hi everyone, | | When I do: | | import rpy2.robjects as R | exampleDict = {'colum1':R.IntVector([1,2,3]), 'column2':R.FloatVector([1,2]), | 'column3':R.FloatVector([1,2,3,4])} | R.DataFrame(exampleDict) | | I get the error that the rows are not of the same lenghts: "arguments imply | differing number of rows: 2, 4, 3". | | How I solved it before is to loop through the lists before making them vectors | and adding NA to all the lists that are smaller than the longest until they are | all of the same length. Is there an easy way of making a dataframe with rpy2 | with different column lengths?
No, R imposes equal length of all vectors with a data.frame. Dirk -- R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL See agenda, registration details and more at http://www.RinFinance.com ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list