Function

コメント・参照等
  • ggCcfをplotly描画に変換する関数

FUN = f_plotly_ccf_from_ggplot.r
function (obj0, col_x = 2, col_y = 3) 
{
    titlefont <- list(size = 13, family = "Meiryo", color = "black")
    tickfont <- list(size = 13, family = "Meiryo", color = "black")
    maintitle <- paste0(colnames(obj0)[col_x], "\n×\n", colnames(obj0)[col_y])
    ggplotly(ggCcf(x = obj0[, col_x], y = obj0[, col_y], plot = T)) %>% layout(showlegend = F) %>% layout(plot_bgcolor = "rgba(0,0,0,0)") %>% layout(paper_bgcolor = "rgba(0,0,0,0)") %>% style(hoverinfo = "x+y") %>% layout(title = maintitle, titlefont = titlefont)
}