1

I'm currently building a dataframe (DF) using R and I'm wanting to add habitat type as a variable. Within DF I have grid reference points as variables.

I've imported a shapefile containing habitat data using rgdal::readOGR.

I'm able to plot the shapefile using the base plot function but I've been unable to add the points from DF and unable to find information anywhere on how to then extract which habitat those points fall into.

  • You are not getting any response here because you have not provided enough detail on your data and have not indicated what you have already tried. This is not a forum for explaining how to perform your analysis. There is a baseline expectation that you when through due diligence before asking a question. There are numerous answers, on this forum and on many other sites, that directly address your question. Please make an effort to at least search the site. eg., "[R] extract" and read the Tour under the help menu. Look at ?sp::over – Jeffrey Evans May 9 '17 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.