How to extract raster values with terra packages

Hi everyone,

I want to extract raster values from vector data in shp. but the extract fonction is just available in terra R version 4.3.0 the same 4.3.2.
my question is how to extract raster values with terra or similary fonction.
raster:extract fonction is not available too.
error picture is attach
thank all

Hi, the examples here should do what you want, assuming that a is a vector file in terra::vect() format.

index.knit (

it helped a lot. but when i run the code the console runs and doesn't stop. the computer freezes.

here is the code attached

thank you

Does b plot properly?

Also, share your code, not screenshots.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.