Re: [R] pasting indexes to variables within loops

2004-10-19 Thread Thomas Lumley
On Tue, 19 Oct 2004, Kristin Kay Nicodemus wrote: Hi all, Hope someone can help me. I start out with a matrix called haplo with 600 rows and two columns. To start with, the elements of the matrix are character strings of 20 numbers. I then want to create separate objects, called ha1-ha600, th

Re: [R] pasting indexes to variables within loops

2004-10-19 Thread Frank Samuelson
as.numeric(apply(haplo, 1 ,function(x) paste(x,collapse=""))) perhaps? Kristin Kay Nicodemus wrote: Hi all, Hope someone can help me. I start out with a matrix called haplo with 600 rows and two columns. To start with, the elements of the matrix are character strings of 20 numbers. I then want

[R] pasting indexes to variables within loops

2004-10-19 Thread Kristin Kay Nicodemus
Hi all, Hope someone can help me. I start out with a matrix called haplo with 600 rows and two columns. To start with, the elements of the matrix are character strings of 20 numbers. I then want to create separate objects, called ha1-ha600, that are the concatenated 20 + 20 numbers, as nume