I am trying ggcorrplot in my server output in R shiny. ggcorrplot is used to create correlation matrix. I tried with renderPlotly. The output is not getting displayed. I am sure its because of this only. When I run ggcorrplot outside R shiny, I am getting the output. Please advice. Or is there an alternate way to create correlation matrix under ggplot only. My Sample data dataframe is like below
install.packages("ggcorrplot")
library(ggcorrplot)
df <- structure(list(Date = structure(c(1L, 1L, 1L, 1L), class = "factor", .Label = "1/1/2010"),
Var1 = 12:15, Var2 = 22:25, Var3 = 32:35, Var4 = 42:45), class = "data.frame", row.names = c(NA,
-4L))
corr <- round(cor(df[2:5]),1)
ggcorrplot(corr,method = "circle",lab = TRUE,hc.order = TRUE)
When I use ggcorrplot under renderploty, there is no output