ggplot为什么说x,y的长度不同?

时间:2019-10-24 05:12:55

标签: r shiny

enter image description here

length(colnames(datasetInput())) = 105length(datasetInput()[2,]) = 105 我想知道ggplot为什么说xy的长度不同

我检查称为datasetInput的数据框。也许问题可能是列名未知。但是length(colnames(datasetInput())=105colnames存在,如您所见。

output$Plot <- renderPlot({
ggplot(datasetInput(), aes( x = colnames((datasetInput())),  
                            y = (datasetInput())[2,] )) + geom_line()
  

美学必须为1或与数据(5)相同:x,y

0 个答案:

没有答案