[R] "unbind" matrix?

David Winsemius dwinsemius at comcast.net
Thu Mar 18 14:33:31 CET 2010



?c


On Mar 18, 2010, at 8:39 AM, ManInMoon wrote:

>
> I have a function that take a variable number of arguments, each of  
> which
> must be a vector.
>
> Is there a way to "unbind" a matrix that would pass the columns as  
> vectors?
>
> Myfunc<-function(...) {
> [My code]
> }
>
> Myfunc(z[,1],z[,2])   works
>
> but Myfunc(z[,1:2]) is passing a submatrix
>
> Is there something like Myfunc(unbind(z[,1:2])) ??
>
>
> -- 
> View this message in context: http://n4.nabble.com/unbind-matrix-tp1597887p1597887.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list