Here is an example of what I understand you want to do. I strongly recommend you read the link @adresrcs provided so you can ask efficient questions in the future.
In my code, I first invent some data, which you will not need to do since you have already imported a data set.
#invent some data
DF <- data.frame(id = 1:10, diag = sample(letters[1:3],10, replace = TRUE),
+ treat = sample(letters[23:26], 10, replace = TRUE))
DF
id diag treat
1 1 a z
2 2 a w
3 3 c z
4 4 b y
5 5 a x
6 6 a x
7 7 c z
8 8 a y
9 9 b z
10 10 c x
#Make a table from two columns
CrossTable <- table(DF$diag, DF$treat)
CrossTable
w x y z
a 1 2 1 1
b 0 0 1 1
c 0 1 0 2