我需要改變某些號碼NA在此反應數據框更改號碼NA,例如,所有-1 NA或全部負數,這樣他們就不會在historgam繪製在反應數據幀
pointsInBounds <- reactive({
if (is.null(input$map_bounds))
return(Data[TRUE,])
bounds <- input$map_bounds
latRng <- range(bounds$north, bounds$south)
lngRng <- range(bounds$east, bounds$west)
subset(Organisms(),
lat >= latRng[1] & lat <= latRng[2] &
lon >= lngRng[1] & lon <= lngRng[2])
})
##histogram
output$hist <- renderPlot({plot1<-
# If no organisms are in view, don't plot
if (nrow(pointsInBounds()) == 0)
return()
hist(...)
您應該能夠使用相同的步驟,修復它通常那樣在R:'DF [DF <0] < - 0' – roarkz
當使用'比較(3)僅可能用於原子和列表類型時,我收到此錯誤代碼' –
[格式化反應性數據幀在閃亮](https://stackoverflow.com/questions/20201070/formatting-reactive-data-frames-in-shiny) –