discount_hack | R Documentation |
This function is a hack to avoid a problem with discounting when the argument is a constant.
discount_hack(.dots)
.dots |
A state object. |
The hack consists in replacing calls to
discount(x)
by discount(x * rep(1, dplyr::n()))
to
ensure x
is recycled to the correct length.
A modified state object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.