r - How to determine the correlation between unordered categorical variables and individuals?
If you have data sets $X_1,\cdots,X_n$ and $Y_1,\cdots,Y_n$, then you can compute their correlation with the following formula:

$$Cor(X,Y) = \frac{\sum (X_i-\bar{X})(Y_i-\bar{Y})}{\sqrt{\sum (X_i-\bar{X})^2\sum(Y_i-\bar{Y})^2}}$$

(where $\bar{X}$ denotes the average value of the $X_i$'s).  This is accomplished in $R$ with the following command:

cor(x,y)


That being said, it is unclear what two data sets you are trying to find the correlation for.  Finding the correlation between a type (A,B,C) and a condition (copper, gold, etc.) would not make any sense.  You could, however, find the correlation between two different types (A and B, for example), or between conditions (copper and gold).

Edit: I think you might want to do a test for independence between categorical variables...if this is the case then this is what you are looking for.