Description Usage Arguments Details Value Examples
get y (right hand of var)
1 |
Formula |
a formula to be paste. |
method |
either |
What do 'raw' variable, 'model' variable, and 'coeff' variable mean?
raw var is the underlying variable without any calculation or transformation.
model var is the underlying variable with calculations or transformation.
coeff var is the coefficient variable in the model output. So only evaluated model has coeff var.
In the formula, log(y) ~ x1 + x2
, we have:
'raw' variable for y
: y
'model' variable for y
: log(y)
'coeff' variable for y
: log(y)
More examples see the sample code below.
y in formula
1 2 3 4 5 6 7 8 9 10 11 | get_y(log(price) ~sdfsf + dsa )
get_y(log(price) ~ sdfsf + dsa, method = "model")
get_y(log(price) ~ sdfsf + dsa, method = "coeff") # same as model var in the get_y() case
# can deal with un-regular formula
get_y(log(price) ~sdfsf + dsa ~ dsad)
get_y(log(price) ~ sdfsf + dsa ~ dsad, method = "coeff")
get_y(log(price) ~ sdfsf + dsa ~ dsad, method = "model")
model_dirty = model = lm(price~ I(carat^ 2) + cut - carat:table - cut ,ggplot2::diamonds)
get_y(model_dirty)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.