October 2019
Beginner to intermediate
674 pages
16h 43m
English
The following code block shows an example in R:
clinical.trial<- data.frame(patient = 1:1000,
age = rnorm(1000, mean = 50, sd = 5),
year.enroll = sample(paste("19", 80:99, sep = ""),
1000, replace = TRUE))
>clinical.trial<- data.frame(patient = 1:1000,
+ age = rnorm(1000, mean = 50, sd = 5),
+ year.enroll = sample(paste("19", 80:99, sep = ""),
+ 1000, replace = TRUE))
>summary(clinical.trial)
patient age year.enroll
Min. : 1.0 Min. :31.14 1995 : 61
1st Qu.: 250.8 1st Qu.:46.77 1989 : 60
Median : 500.5 Median :50.14 1985 : 57
Mean : 500.5 Mean :50.14 1988 : 57
3rd Qu.: 750.2 3rd Qu.:53.50 1990 : 56
Max. :1000.0 Max. :70.15 1991 : 55
(Other):654
>ctcut<- cut(clinical.trial$age, breaks = 5)> table(ctcut) ...Read now
Unlock full access