Description Usage Arguments Details Value Author(s) See Also Examples
This function should be used in preference to calls to new
to create
instances of the ClinicalTrials class.
1 | createTrial(CExp, seed)
|
CExp |
An instance of the ClinicalExperiment class. |
seed |
A seed for the random number generator. |
To ensure proper initialization of the different components this
function should be called when creating new instances of the
ClinicalTrial
class.
An instance of the ClinicalTrial
class.
R. Gentleman
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #define the available treatments and their relative allocations
trts = c( A = 3L, B = 4L, C = 1L)
#describe the permuted block design
pbdesc = new("PermutedBlockDesc", treatments = trts, type="PermutedBlock",
numBlocks=4L)
pIDs = new("PatientID", strata="Test", start=100L, stop=200L)
#define the ClinicalExperiment
CE1 = new("ClinicalExperiment",
name="My first experiment",
treatments = trts,
factors = list( F1 = c("A", "B", "C"), F2 = c("t1", "t2")),
randomization = list(pbdesc),
patientIDs = pIDs
)
#now create the instance of the trial
CT1 = createTrial(CE1, seed=301)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.