Over four hundred samples were taken from cores that form a vertical plane section through the Swan Hills Reef, an important oil-bearing reservoir in the Devonian rocks of west-central Alberta. Quantitative determinations for eight elements were made on the samples by direct-reading emission spectrometry. The resulting chemical data were treated by R-mode factor analysis techniques, including rotation to oblique solutions and the computation of factor scores. The distribution of the different factors within the reef was then determined by computing trend surfaces for the scores. Factors with low eigenvalues and even specific factors were found of considerable use for interpreting the data.Dolomite in the reef appears to be derived mainly from high-magnesian calcite of possible algal origin that was formed on the windward side of the reef. Sr held in calcite as a solid solution impurity shows a primary trend to depletion in the organic framework facies that margins the reef. This is caused by greater diagenetic leaching of these rocks. Secondary variation of Sr may indicate periods when the reef was elevated above sea level and underwent subaerial weathering. Vertical variation of Mn and Fe held in solid solution in calcite appears to be related to tectonic changes in the region.