The influence of spatial processes at multiple scales on local community structure and function