Patrick;
You got two helpful suggestions for where to start your learning how
to reshape your data. I am going to admit that I have recurring
difficulty using either reshape() or the functions in the reshape
package. It undoubtedly reflects some sort of constricted abstraction
capability
Using reshape you can try this:
reshape(resp.df, direction = long, idvar=patient, varying =
list(grep(fev, names(resp.df
On Thu, Aug 27, 2009 at 8:37 PM, Richardson, Patrick
patrick.richard...@vai.org wrote:
I have a dataset that I'm trying to rearrange for a repeated measures
analysis:
On Thu, Aug 27, 2009 at 6:37 PM, Richardson,
Patrickpatrick.richard...@vai.org wrote:
I have a dataset that I'm trying to rearrange for a repeated measures
analysis:
It looks like:
patient basefev1 fev11h fev12h fev13h fev14h fev15h fev16h fev17h fev18h drug
201 2.46 2.68 2.76
?reshape
On 28/08/2009, at 11:37 AM, Richardson, Patrick wrote:
I have a dataset that I'm trying to rearrange for a repeated
measures analysis:
It looks like:
patient basefev1 fev11h fev12h fev13h fev14h fev15h fev16h fev17h
fev18h drug
201 2.46 2.68 2.76 2.50 2.30 2.14
I suspect reshape() is the function you're looking for; there is also a
reshape package that you might prefer.
It's also quite easy to do this in base R using unlist() and some indexing
with rep, but that may be more than you care to deal with.
Bert Gunter
Genentech Nonclinical Biostatisics
5 matches
Mail list logo