R

Asked • 06/03/19

Extract every nth element of a vector?

I would like to create a vector in which each element is the `i+6th` element of another vector.For example, in a vector of length 120 I want to create another vector of length 20 in which each element is value `i, i+6, i+12, i+18...` of the initial vector, i.e. I want to extract every 6th element of the original.

1 Expert Answer

By:

Jesse E. answered • 06/03/19

Tutor
4.6 (8)

Experienced tutor for TEAS, chemistry, and biology

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.