Session Ready
Exercise

Simple spatial principles

For these first few exercises you'll mostly use standard R functions to generate some point patterns.

Firstly, you'll generate 200 points uniformly in a rectangle. The rectangle will have its bottom left corner at coordinate (0, 0) and its top right corner at (1, 2), so it is taller than it is wide.

runif(n, a, b) will generate n random numbers anywhere between a and b.

Instructions
100 XP
  • Set the minimum and maximum values of the rectangle in X and Y coordinates.
  • Complete the call to runif() to create the X coordinates, and write the similar line for the Y coordinates. Note that n is already defined for you.