How to Create a Vector with Intervals in R (Example Code)

In this tutorial you’ll learn how to create a vector with intervals in the R programming language.

Example: Apply seq Function to Create Numeric Vector with Intervals

seq(from = 1,                     # Applying seq function
    to = 30,
    by = 3)
# [1]  1  4  7 10 13 16 19 22 25 28

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top