[R] generating strings in a tricky order

From: Taka Matzmoto <sell_mirage_ne_at_hotmail.com>
Date: Sun 05 Feb 2006 - 14:16:00 EST


Hi R users

I like to generate some strings (a character vector) in a special way like

If i have 5 variables

"002.001",
"003.001", "003.002",
"004.001", "004.002", "004.003",
"005.001", "005.002", "005.003", "005.004"

so the created string vector's elements are

"002.001", "003.001", "003.002","004.001", "004.002", "004.003","005.001",
"005.002", "005.003", "005.004"

I tried to come up with for loop with two indexes (i and j) but I kept failing to generate that kind of order of strings. The order of the element in the character vector is very improtant.

Any advice or help would be appreciated

Thanks in advance

TM,



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Feb 05 14:23:22 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:23 EST