s-news
[Top] [All Lists]

combine dataframes with continuous id

To: s-news@lists.biostat.wustl.edu
Subject: combine dataframes with continuous id
From: "Mathangi Gopalakrishnan" <mathangi@msn.com>
Date: Mon, 20 Oct 2003 14:36:17 -0700
Hello all,
I have 2 dataframes each with 3 columns (id, Time & Concentration).
Dataframe 1 has 2 patients each with 2 timepoints.
Dataframe 2 has 2 patients each with 4 timepoints.
I combined the 2 dataframes using rbind(dataframe1, dataframe2)
I would like to have a continuous id for all four patients. How do i code to assign continuous id nos for all patients.
The final dataset should be something of this sort
id  Time  Conc
1   0         x1
1   0.5      x2
2   0          .
2   0.5       .
3   0
3   0.5
3   1
3   2
4  so on
4
4
4

Any help is appreciated

Thank you.


Best Wishes,
Mathangi Gopalakrishnan

_________________________________________________________________
Add MSN 8 Internet Software to your current Internet access and enjoy patented spam control and more. Get two months FREE! http://join.msn.com/?page=dept/byoa


<Prev in Thread] Current Thread [Next in Thread>
  • combine dataframes with continuous id, Mathangi Gopalakrishnan <=