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
?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
I am trying to un-c...
--
View this message in context:
http://n4.nabble.com/unbind-matrix-tp1597887p1597987.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
Did you try it?
On Mar 18, 2010, at 10:03 AM, ManInMoon wrote:
I am trying to un-c...
--
View this message in context:
http://n4.nabble.com/unbind-matrix-tp1597887p1597987.html
Sent from the R help mailing list archive at Nabble.com.
__
I think I may have figured out what you _might_ have meant. An example
would have speeded this process up considerably. Try:
apply(mtx, 2, function) # perhaps within the MyFunc ... that you also
did not provide.
--
David.
On Mar 18, 2010, at 10:03 AM, ManInMoon wrote:
I am trying to
Sorry David,
Here's cut down version of my function - real version does some fancy plot
formatting.
I have found a way round my problem because cbind will bind vectors and
matrices into a single matrix, which I can work with. It is not the answer I
was looking for - but it does the job.
Many
Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of ManInMoon
Sent: Thursday, March 18, 2010 5:39 AM
To: r-help@r-project.org
Subject: [R] unbind matrix?
I have a function that take
7 matches
Mail list logo