Hello,
here is he first 20 sample of my dataset
data.frame(
ID = c(1,2,3,4,5,6,7,8,9,10,11,12,13,
14,15,16,17,18,19,20),
Rescan = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
2 = rescan. These are prostate cancer patients, 2 determines if needs rescan. 1 = no rescan.
I can plot a barchart using this code
barplot(table(prostate_cleaned$Rescan), col= c("green", "red"), ylab='Number of Patients')
However, what I want, is the frequency (i.e. the actual value of number of patients that are either in '1' or '2') diplayed at the top of each bar.
I have used the text() fucntion..but it doesnt work. Can someone please help. Thanks