Re: [R] Split rownames into factors

2009-07-27 Thread Bill.Venables
?substring Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jimdare Sent: Tuesday, 28 July 2009 8:10 AM To: r-help@r-project.org Subject: [R] Split rownames into factors

Re: [R] Split rownames into factors

2009-07-27 Thread Christopher Bare
Hi, I'm not an R expert, but I thought I'd give your question a shot anyway. First, it looks like you're starting with a matrix, rather than a list. Let's hope I guessed that right: > m = matrix(c(324, 65, 543, 23, 54, 8765, 213, 43, 65)) > rownames(m) = c('X1Jan08', 'X1Jun08', 'X1Dec08', 'X2Jan

[R] Split rownames into factors

2009-07-27 Thread jimdare
Hi Guys, I was wondering how you would go about solving the following problem: I have a list where the grouping information is in the row names. Rowname [,1] X1Jan08 324 X1Jun08 65 X1Dec08 543 X2Jan08 23 X2Jun08 54 X2Dec08 8765 X3Jan08 213 X3Jun08 43 X3Dec08 65 How can I create the f