Description Usage Arguments Value Examples
View source: R/gg_utility_of_pay.R
Function expects "make_willingness_utility" function output as data
1 2 3 4 5 6 7 8 9 10 | gg_utility_of_pay(
x,
jump = 5,
float = 0.5,
cost = 0,
tit = "",
xsize = 15,
yl = "Expected Utility (Price * Willingness to Pay)",
xl = "Price (ILS)"
)
|
x |
a tbl() that is the output of make_willingness_utility() |
jump |
by default ==5 jumps between labels |
cost |
by default ==0 a constant to reduce from utility |
tit |
by default = "Willingness to Pay", |
xsize |
by default = 15, text size |
yl |
y label, by default = "Percent Willing to Pay" |
xl |
x label, by default = "Price (ILS)" |
the function generates ggplot curve of the Expected Utility
1 2 3 4 5 6 7 8 9 | quality_assurance <- data.frame(
ID = 1:500,
money_willing_to_pay = sample(seq(0,20,5), size = 500, replace = T),
year = sample(c("2018", "2019", "2020"), size = 500, replace = T))
input <- quality_assurance %>%
saridr::make_willingness_utility(money_pay_var_string = "money_willing_to_pay")
gg_utility_of_pay(x=input,jump=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.