Session Ready
Exercise

Plot your raster object

Similar to what you saw in the exercises related to vector objects it's often useful to quickly look at a map of your raster objects with the plot() function.

The raster package has added useful methods for plotting both single and multi-band rasters. For single-band rasters or for a map of each layer in a multi-band raster you can simply use plot(). If you have a multi-band raster with layers for red, green and blue light you can use the plotRGB() function to plot the raster layers together as a single image.

Instructions
100 XP
  • Plot the canopy raster with the plot() function, it is a single-band raster called canopy.
  • Plot the manhattan raster with the plot() function, it is a multi-band raster called manhattan.
  • Plot the manhattan raster with plotRGB() to see all layers plotted together as a single image.