source("http://192.38.117.59/~linearpredictors/datafiles/readFibrosis.R") ## counting number of patients in each stage group table(fibrosis$stage, dnn = "Degree of Fibrosis") ## median and range of "ha" within the stage groups tapply(fibrosis$ha, fibrosis$stage, function(x)median(x, na.rm=T)) tapply(fibrosis$ha, fibrosis$stage, function(x)range(x, na.rm=T)) ## median and range of "p3np" within the stage groups tapply(fibrosis$p3np, fibrosis$stage, function(x)median(x, na.rm=T)) tapply(fibrosis$p3np, fibrosis$stage, function(x)range(x, na.rm=T)) ## median and range of "ykl40" within the stage groups tapply(fibrosis$ykl40, fibrosis$stage, function(x)median(x, na.rm=T)) tapply(fibrosis$ykl40, fibrosis$stage, function(x)range(x, na.rm=T))