Hi.
Can anyone help me?
I want to create a vector from specific matrix-elements( e.g.[1,1]) these matrices are
elements of a list.
Is there any possibility to work without a loop? (e.g. with lapply?)
hope, you can help me
thank you
Michael
[[alternative HTML version deleted]]
Michael Kirschbaum [EMAIL PROTECTED] writes:
I want to create a vector from specific matrix-elements( e.g.[1,1])
these matrices are elements of a list.
Is there any possibility to work without a loop? (e.g. with lapply?)
Sounds like you want
lapply(mlist, [, i = 1, j = 1)
where mlist is
Have you considere unlist? Also, note that a matrix is a vector with
a dim attribute, and a data.frame is actually a list with some other
attributes.
hope this helps.
spencer graves
Michael Kirschbaum wrote:
Hi.
Can anyone help me?
I want to create a vector from specific matrix-elements(
: Wednesday, July 16, 2003 10:24 AM
To: [EMAIL PROTECTED]
Subject: [R] turning list-elements into a vector
Hi.
Can anyone help me?
I want to create a vector from specific matrix-elements(
e.g.[1,1]) these matrices are elements of a list. Is there
any possibility to work without a loop
Michael Kirschbaum wrote:
Hi.
Can anyone help me?
I want to create a vector from specific matrix-elements( e.g.[1,1]) these matrices are
elements of a list.
Is there any possibility to work without a loop? (e.g. with lapply?)
hope, you can help me
thank you
Michael
[[alternative HTML version
hi Emkiba, try this:
x - matrix(1:12, 4, 3)
y - matrix(x, 12, 1)
yy - y[,1]
regards,
Huan
Internet
[EMAIL PROTECTED]@stat.math.ethz.ch - 07/16/2003 03:24 PM
Sent by:[EMAIL PROTECTED]
To:r-help
cc:
Subject:[R] turning list-elements into a vector
Hi.
Can anyone help me?
I