Generating a complex table of drug, disease, and phase

Synopsis of Problem:

  • Trying to create a table which lists the drugs and diseases for a given phase or combination of phases of a clinical trial (I, II, II).
  • Data structure: Each observation has a given drug, disease, and phase. For each drug, there could be multiple diseases and/or phases.

The attached files give possible solutions:

  • Possible Solution 2 (Jeremy Stephens):
    • drugs.r: R Code
    • Will produce the following data frame (newx) based on the test data:

   Drug Phase                             Disease
1     A   III                      Healthy Normal
2     B    II                Rheumatoid Arthritis
3     B     I Healthy Normal,Rheumatoid Arthritis
4     C     I                      Osteoarthritis
5     D    II                          Depression
6     D   III                      Healthy Normal
7     E     I                       Venous Ulcers
8     F     I                       Venous Ulcers
9     G    II                             Anxiety
10    G   III                          Depression
11    G     I                      Healthy Normal
12    H    II                Rheumatoid Arthritis
13    I    II                              Asthma
14    I     I                        Hypertension
15    J    II                      Osteoarthritis
16    K     I                              Asthma
17    K   III           Chronic Pulmonary Disease
18    K    II                              Asthma
19    L   III                     Prostate cancer
20    L    II                     Prostate cancer
21    M     I       Obsessive Compulsive Disorder
22    M   III                                ADHD
23    M    II       Obsessive Compulsive Disorder
24    N   III                            Diabetes

Haven't worked out how to put it in a format like
    I    II    II
Drug

Yet, but that'll be next along with the
Phase    Drug    Disease
I    A    ..., ...
     B       ..., ...
     C       etc.
II   D
     E
     F
III  G
     H
     I
format.

  • Possible Solution 3 (Svetlana Eden):
Topic revision: r8 - 15 Nov 2006, TheresaScott
 

This site is powered by FoswikiCopyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback