i am not able to display all filtered rows from datatable in a plot, and the function, which suppose to use all filtered rows -> input$tabelle_rows_all
, uses the rows only on the current page! My DT version is 0.1, and i cannot update it to github version. I have tried many approaches, first via devtools::install_github('rstudio/DT')
but i got an error
...--install-tests Der Befehl "C:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Error: Command failed (1)
than i downloaded the development version (https://github.com/rstudio/DT/archive/master.tar.gz) and i used command
install.packages("C:/Users/XX/Downloads/DT-master.tar.gz",lib="C:/Users/XX/Documents/R/win-library/3.2")
.
However still i got error:
Warning in install.packages : package ‘C:/Users/XX/Downloads/DT-master.tar.gz’ is not available (for R version 3.2.3)
...
This is very necessary and important option which i need for DT, is there anyway i could get it done?
Easy example of the code:
library(shiny)
library(DT)
library(ggplot2)
x <- as.numeric(1:1000000)
y <- as.numeric(1:1000000)
data <- data.frame(x,y)
shinyApp(
ui = fluidPage(dataTableOutput('tableId'),
plotOutput('plot1')),
server = function(input, output) {
output$tableId = renderDataTable({
datatable(data, options = list(pageLength = 100, lengthMenu=c(100,200,300,400,500,600)))
})
output$plot1 = renderPlot({
filtered_data <- data[input$tableId_rows_all, ]
ggplot(data=filtered_data, aes(x=x,y=y)) + geom_line()
})
}
)
Thanks for any interest
[Just to clear it one more time]:
I got quite big data (>5000000 rows), and i display it in shiny app using datatable (DT
) with filters. Depending on the user preferences for filtering, lets assume it gives us 550 rows (but it can give us more or less than that). Because of pagination I am not able to see all 550 rows (assuming pageLength
is 100) or whats even worse, i am not able to display all filtered rows further in a plot, as function input$tabelle_rows_all
uses the rows on the current page (i must first change the entries number). Is there any way to get all found rows after filtering datatable (not depended on pageLength
)?
I read somewhere that the problem might be with the version od DT
, so maybe DT
0.1 does not support the function to plot all the found rows, so i am hoping that the github version of DT
is the solution of my problem. But i might be wrong!