There is no "cbind.na" in a vanilla R install. May be this is a function coming with a package and it should be loaded because the function can be found by R ?

L.

PS: I am not certain about the intent behind trying to "append a vector to a matrix when they have a different number of rows".

On 2012-02-28 15:44, Niek de Klein wrote:
Hi everyone,

I want to append a vector to a matrix with different row lengths using the cbind.na <http://cbind.na> method from R. However, robjects doesn't find cbind.na <http://cbind.na>

    import rpy2.robjects as R
    R.r['cbind.na <http://cbind.na>'](matrix, vector)

gives a LookupError: 'cbind.na <http://cbind.na>' not found. Python docstrings only says:

cbind(/*args/, /**kwargs/)ΒΆ <http://rpy.sourceforge.net/rpy2/doc-2.1/html/robjects.html#rpy2.robjects.vectors.DataFrame.cbind>

        bind objects as supplementary columns

And the only example I can find of using name*dot*name that I can find is about parameters, like this example:

     from  rpy2  import  robjects


     myparams  =  {'na.rm':  True}
     robjects.r.sum(0,  **myparams)

So how can I append a vector of to a matrix when they have a different number of rows?

Thanks!
Niek de Klein


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d


_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to