Code from: Simulating plasticity as a framework for understanding habitat selection and its role in adaptive capacity and extinction risk through an expansion of CDMetaPOP