half.slope.ratio <- function (sx, sy, px, py){
tx <- (sx ^ px - 1) / px
ty <- (sy ^ py - 1) / py
b.left <- diff(ty[1 : 2]) / diff(tx[1 : 2])
b.right <- diff(ty[2 : 3]) / diff(tx[2 : 3])
b.right / b.left
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.