[Rpy] Calling an R function with a variable number of arguments

2010-11-20 Thread Giovanni Luca Ciampaglia
Hi all, I am trying to wrap adk.test from R package adk using rpy2 2.2.1 but I am running into problems with passing parameters to it. More specifically I get a runtime error in R: > In [1]: %run ad.py > Carico il pacchetto richiesto: adk > Error in sort.list(unique(x)) : > 'x' must be atomic

Re: [Rpy] Calling an R function with a variable number of arguments

2010-11-20 Thread Giovanni Luca Ciampaglia
Btw, the same happens when using rimport: from rpy2.robjects.packages import importr from rpy2.robjects import Vector adk = importr('adk') adk.adk_test(Vector([1,2,3]),Vector([4,5,6])) So far the only way to get a result was to directly pass a list, as in: adk.adk_test([1,2,3,4]) but then it tre

Re: [Rpy] Calling an R function with a variable number of arguments

2010-11-20 Thread Laurent Gautier
The error message is coming from R, and relates to an improper usage for the function adk_test. In other words, this is a case of RTFM ;-) adk.adk_test(IntVector([1,2,3]), IntVector([4,5,6])) or adk.adk_test(Vector(IntVector([1,2,3]), IntVector([4,5,6]))) Should work. L. PS: rpy2-2.2.0-dev