livia wrote:
> Hi, I have a series of return data, a and b are factors. I would like to
> build a matrix which contains each vector of "returns". I am thinking about
> something as following, but I guess there should be a sensible way of doing
> this.
>
> returns <- split(return, list(regimef, assetf))
> cbind(returns[[1]], returns[[2]],...,returns[[n]])
Does
do.call("cbind", returns)
do what you want ?
HTH,
Tobias
--
Tobias Verbeke - Consultant
Business & Decision Benelux
Rue de la révolution 8
1000 Brussels - BELGIUM
+32 499 36 33 15
[EMAIL PROTECTED]
______________________________________________
[email protected] 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.