Online training class for Clinical R programming batch starts on Monday, 02Feb2026.
Click here for details.
class<-tribble(
~Name,~Sex,~Age,~Height,~Weight,
"Alfred","M",14,69,112.5,
"Alice","F",13,56.5,84,
"Barbara","F",13,65.3,98,
)
class1<-tribble(
~Name,~Sex,~Age,~Height,~Weight,
"Alfred","M",14,69,112.5,
"Alice","F",13,56.5,84,
"Barbara","F",13,65.3,98,
"Henry","M",14,63.5,102.5,
"James","M",12,57.3,83,
)
counts01<-count(class,Sex)
counts02<-count(class1,Sex,Age) class <- data.frame(
Name = c("Alfred", "Alice", "Barbara"),
Sex = c("M", "F", "F"),
Age = c(14, 13, 13),
Height = c(69, 56.5, 65.3),
Weight = c(112.5, 84, 98)
, stringsAsFactors = FALSE
)
class1 <- data.frame(
Name = c("Alfred", "Alice", "Barbara", "Henry", "James"),
Sex = c("M", "F", "F", "M", "M"),
Age = c(14, 13, 13, 14, 12),
Height = c(69, 56.5, 65.3, 63.5, 57.3),
Weight = c(112.5, 84, 98, 102.5, 83)
, stringsAsFactors = FALSE
)
counts01 <- as.data.frame(table(class$Sex))
counts02 <- as.data.frame(table(class1$Sex, class1$Age))