Session Ready
Exercise

Sequences of certain length

The seq() function has another useful argument. The argument length.out. This argument lets us generate sequences that are increasing by the same amount but are of the prespecified length.

For example, this line of code

x <- seq(0, 100, length.out = 5)

produces the numbers 0, 25, 50, 75, 100.

Let's create a vector and see what is the class of the object produced.

Instructions
100 XP
  • Determine the class of a vector generated with seq using the length.out argument.
  • Specifically, what is the class of the following object a <- seq(1, 10, length.out = 100)?