Hi,
I need help generalizing the following non-symmetric "identity"-like matrix
In this case:

p = 5
k=3

and I want this:

I.kp <- cbind(diag(3), c(0, 0, 0), c(0, 0, 0))

How can I generalize this so that I don't have to add/subtract c(0, 0,
... , 0) when p and k changes?

Hopefully that makes sense.
Thanks.
Chuck

______________________________________________
R-help@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.

Reply via email to