function to subset a structure conditonal on a field value; fixed conditions assigned to test