Description Usage Arguments Value Examples
Creates a trend vector for binary exposure data, centered at a probability p
.
1 2 
n 
A nonnegative integer specifying the number of days to simulate. 
p 
A numeric value between 0 and 1 giving the mean probability of exposure across study days. 
trend 
A character string that gives the trend function to use. Options are:

slope 
A numeric value specifying the slope of the trend, to be used
with 
amp 
A numeric value specifying the amplitude of the seasonal trend. Must be between .5 and .5. 
start.date 
A date of the format "yyyymmdd" from which to begin simulating values. 
custom_func 
An R object specifying a customized function from
which to create a trend variable. Must accept arguments 
... 
Optional arguments to a custom trend function 
A numeric vector of daily expected probability of exposure, to be used to generate binary exposure data with seasonal trends.
1  bin_t(n = 5, p = .3, trend = "cos1", amp = .3)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.