Re: [R] reshape is re-ordering my variables

2010-09-22 Thread Kevin E. Thorpe
On 09/21/2010 09:44 PM, Dennis Murphy wrote: Hi: Reshaping multiple variables is nontrivial. Try the following (untested): reshape(rcw, idvar = 'ICU', varying = list(c(paste('Q6.RC', 1:4, sep = '.'), c(paste('Q6.FT.RC', 1:4, 'years', sep = '.'),

Re: [R] reshape is re-ordering my variables

2010-09-21 Thread Dennis Murphy
Hi: Reshaping multiple variables is nontrivial. Try the following (untested): reshape(rcw, idvar = 'ICU', varying = list(c(paste('Q6.RC', 1:4, sep = '.'), c(paste('Q6.FT.RC', 1:4, 'years', sep = '.'), c(paste('Q6.FT.RC', 1:4, 'months',

[R] reshape is re-ordering my variables

2010-09-21 Thread Kevin E. Thorpe
Is it an undocumented (at least I missed it if it's documented) feature of the reshape function to do numeric variables followed by character? I ask because that seems to be the case below. > str(rcw) 'data.frame': 23 obs. of 21 variables: $ ICU : int 1 18 17 9 22 19 6 16 25 26