शुरू करेंमुफ़्त में शुरू करें

Let's take a look at a spatial object

We've loaded a particular sp object into your workspace: countries_sp. There are special print(), summary() and plot() methods for these objects. What's a method? It's a special version of a function that gets used based on the type of object you pass to it. It's common when a package creates new types of objects for it to contain methods for simple exploration and display.

In practice, this means you can call plot(countries_sp) and if there is a method for the class of countries_sp, it gets called. The print() method is the one called when you just type an object's name in the console.

Can you figure out what kind of object this countries_sp is? Can you see what coordinate system this spatial data uses? What does the data in the object describe?

यह अभ्यास पाठ्यक्रम का हिस्सा है

Visualizing Geospatial Data in R

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Print countries_sp. Why isn't this very useful?.
  • Call summary() on countries_sp.
  • Call plot() on countries_sp.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

library(sp)

# Print countries_sp


# Call summary() on countries_sp


# Call plot() on countries_sp
कोड संपादित करें और चलाएँ