Bugs item #2359755, was opened at 2008-11-29 21:25
Message generated for change (Comment added) made by lgautier
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453021&aid=2359755&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: Source
Group: rpy2
>Status: Closed
>Resolution: Rejected
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: lgautier (lgautier)
Summary: passing arguments into heatmap

Initial Comment:
Trying to create a heatmap and then asking to turn the dendrogram function off 
spits out

Error in agglo.FUN(vals[iOrd]) : invalid 'type' (character) of argument

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sw/lib/python2.6/site-packages/rpy2/robjects/__init__.py", line 407, 
in __call__
    res = super(RFunction, self).__call__(*new_args, **new_kwargs)
rinterface.RRuntimeError: Error in agglo.FUN(vals[iOrd]) : invalid 'type' 
(character) of argument


And the relevant code used to provoke this error is:

import rpy2.robjects as r
all_reads = [r.FloatVector([1, 2, 3, 4, 5, 6]), r.FloatVector([3, 3, 2, 3, 3, 
4])]
r_data = r.r.c(*all_reads)
length = range(5, 11)
r_names = r.r.list(r.r.c(*length), r.r.c(['one', 'two']))
r_matrix = r.r.matrix(r_data, ncol = 2, dimnames = r_names)
r.r.heatmap(r_matrix)
args = {'Rowv': 'NA'}
r.r.heatmap(r_matrix, **args)


I don't know if this is a general flaw in argument passing, or just related to 
the heatmap function, but it is causing a headache :)  Line 404 in the 
__init__.py file that spits out the error on line 407 was indented a little 
funnily, but changing this didn't resolve the error. I don't know enough python 
to hunt it down, however!

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

>Comment By: lgautier (lgautier)
Date: 2008-11-29 22:11

Message:

'NA' is a string, just like entering "NA" (the quotes) in R will return a
vector of mode 'character'.

I do not see a bug, and I think that you probably meant:
 
args = {'Rowv': r.r('NA')}



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

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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to