talgalili / d3heatmap

A D3.js-based heatmap htmlwidget for R
Other
236 stars 95 forks source link

x must be numeric problem in d3heatmap shiny #83

Open stephenireland23 opened 6 years ago

stephenireland23 commented 6 years ago

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" ) }) }