Hi all, Tnx for all the replies: Mike Colvin provided a simple answer in one step. Bats.cast <- dcast(data = Bats.melt, formula = Species ~ Location, fill =0) tnx all for the reminder of potential issues of willy nilly replacing missing data with zeros. In this case the 0 [zero value] for NAs is correct in this application as the NAs do not represent "missing data" but actually no occurrence of a critter in a given habitat location so the values need to be a 0. Tnx again, Bruce -- Bruce W. Miller, PhD. Neotropical bat risk assessments If we lose the bats, we may lose much of the tropical vegetation and the lungs of the planet Using acoustic sampling to map species distributions for >15 years. Providing Interactive identification keys to the vocal signatures of New World Bats For various project details see: https://sites.google.com/site/batsoundservices/ [[alternative HTML version deleted]]