[Rpy] Barplot Error: rpy.RPy_RException: Error in -0.01 * height : non-numeric argument to binary operator

2009-05-15 Thread krysta Giles-Hansen
from rpy import r import Numeric r.png('output_r_test.png') bars = Numeric.array([[25,15,26,25,18],[45,32,28,12,45]]) print bars r.barplot(bars, beside = "TRUE" ) r.dev_off() Gives the following output: [[25 15 26 25 18] [45 32 28 12 45]] Traceback (most recent call last): File "r_test

Re: [Rpy] Barplot Error: rpy.RPy_RException: Error in -0.01 * height : non-numeric argument to binary operator

2009-05-21 Thread krysta Giles-Hansen
Thanks Marc, Indeed my data is in the wrong class! I understand that it needs to be a matrix for barplot, but when I try to convert my list to a matrix, it doesnt seem to convert. How do I get the matrix() function (or array for that matter) working properly for me! The code below shows what