'How to view output table in R Shiny?

I am currently trying to add my output table to my ui.R.

I have:

In Server:

output$table <- DT::renderDataTable(DT::datatable)({
data <- data.table(redactedColumnName = redactedVariableName)
data })

In ui:

DT::dataTableOutput("table")

The error I receive is

Error: "Expecting a single string value: [type=character, extent = 0].

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source