In R, you can use the seq()
function to create a vector going from 0 to 300 in increments of 10. The seq()
function takes three arguments: the starting point, the end point, and the increment.
Here's how you can use seq()
to create the desired vector:
29 chars2 lines
This will create a vector named my_vector
that starts from 0, ends at 300, and increments by 10. You can adjust the values passed to seq()
to customize the range and increment as per your requirements.
You can also achieve the same result using the colon operator :
:
19 chars2 lines
This creates a sequence from 0 to 300 with an implicit increment of 1. To change the increment to 10, you can use the seq()
function as shown earlier.
gistlibby LogSnag