Reputation: 11
server<-function(input,output,session) {
observeEvent(input$do, {
con <- dbConnect(odbc::odbc(), "$$$$", uid = "$$$$", pwd = "$$$$")
result<-dbSendQuery(con,"select * from table_name")
data.frame<-dbFetch(result)
View(data.frame)
I have want the view the table in the R browser (not the console), so what function exactly need to use?
Upvotes: 1
Views: 511
Reputation: 37879
One way would be to use tableHTML
which would convert your data.frame into an HTML table to make it possible to view on RStudio's browser (or your browser):
As an example:
library(tableHTML)
tableHTML(mtcars)
Upvotes: 1