Skip to contents

Create a vector of 0s and 1s that that alternate with a given frequency. This is intended to be used to indicate when certain actions should occur within a loop.

Usage

generate_annual_frequency(frequency, len)

Arguments

frequency

freqency with which a 1 occurs

len

length of output vector