khazaei at ceremade.dauphine.fr
2010-Mar-02 11:29 UTC
[R] question to define a matrix with some vectors with different lengths
Hi, I have some vector v1,v2,...,vk, with different lengths. I want to consider these vectors as a matrix with k rows. Can you please guide me how I can do it? Regards khazaei
Karl Ove Hufthammer
2010-Mar-02 12:22 UTC
[R] question to define a matrix with some vectors with different lengths
On Tue, 2 Mar 2010 12:29:28 +0100 (CET) khazaei at ceremade.dauphine.fr <khazaei at ceremade.dauphine.fr> wrote:> I have some vector v1,v2,...,vk, with different lengths. I want to > consider these vectors as a matrix with k rows. > Can you please guide me how I can do it?What do you want to do with the missing elements? -- Karl Ove Hufthammer
jim holtman
2010-Mar-02 13:11 UTC
[R] question to define a matrix with some vectors with different lengths
This is what you would use a 'list' for. On Tue, Mar 2, 2010 at 6:29 AM, <khazaei at ceremade.dauphine.fr> wrote:> Hi, > I have some vector v1,v2,...,vk, with different ?lengths. I want to > consider these vectors as a matrix with k rows. > Can you please guide me how I can do it? > > Regards > khazaei > > ______________________________________________ > 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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?