when I try to produce a heatmap using the code below, in shiny an x must be numeric error appears. could anyone explain why this is based on the code below. thanks
d <-read.csv("dataset2.csv",header=TRUE,sep=",")
mat1<-as.matrix(d, nrow=10,ncol=20, byrow=TRUE,header=TRUE,sep=",")
when I try to produce a heatmap using the code below, in shiny an x must be numeric error appears. could anyone explain why this is based on the code below. thanks
d <-read.csv("dataset2.csv",header=TRUE,sep=",") mat1<-as.matrix(d, nrow=10,ncol=20, byrow=TRUE,header=TRUE,sep=",")
server <- function(input, output, session) { output$heatmap <- renderD3heatmap({ d3heatmap( scale(mat1), colors = input$palette, dendrogram = if (input$cluster) "both" else "none" ) }) }