The radio frequency (RF) spectrum is a limited resource. Spectrum allotment disputes stem from this scarcity as many radio devices are confined to a fixed frequency or frequency sequence. One alternative is to incorporate cognition within a reconfigurable radio platform, therefore enabling the radio to adapt to dynamic RF spectrum environments. In this way, the radio is able to actively sense the RF spectrum, decide, and act accordingly, thereby sharing the spectrum and operating in more flexible manner. This paper presents a novel method for determining clustering configurations for various network topologies and RF spectrum environments. Using the k-means clustering software testbed provided by the University of Maryland, we demonstrate through MATLAB simulation that it is possible and feasible to implement k-means clustering in a cognitive radio network. This resulting network configuration is resistant to interference via commonality between observed RF spectra. We also propose a new metric, Intra-Cluster Spectrum Similarity (ICSS), as the means for evaluating clustering effectiveness. We show that our method, when validated using ICSS, has great potential for improving cognitive radio network reliability in a dynamic spectrum environment.