If x is a 2x2 table then the odds ratio is returned. If x is a 2x2x2 table then Bartlett's ratio of odds ratios is calculated.To be able to calculate odds ratios even for huge numbers, the log of each cell count is taken.
Calculation of an odds ratio becomes difficult in presence of zeros. Depending on the position(s) of zero(s) in the table, the ratio becomes zero, NaN or Inf. This corresponds to the behaviour of the fisher.test in such a case. However, another strategy is chosen by the vcd pacakge. Here a small number (0.5) is added to each cell.
Note that this routine calculates the sample odds ratio (also: conditional Maximum Likelihood estimate). This is different to other routines like fisher.test, which calculate the conditional Maximum Likelihood Estimate (MLE).