I am trying to merge these two reactive datasets and join them to display a table. Any advice? Here is the code in server.R:
  dataset1 <- reactive({
    result <- custom_function_call(*params in here*)
  })
    dataset2 <- reactive({
    result <- custom_function_call_v2(*params in here*)
  })
    joined_dataset <- reactive({
     result<-merge(x = dataset1(), y = dataset2(), by = "UniqueID", all = TRUE)
      result<-
        result%>%
        mutate(*dyplr code to create new cols here*)
        return(result)
        })
  output$summaryTableName <- 
    DT::renderDataTable({
      res <- joined_dataset()
      return(res)
    }) 
Error message: Error in as.data.frame.default: cannot coerce class "c("datatables", "htmlwidget")" to a data.frame Stack trace (innermost first): 99: as.data.frame.default 98: as.data.frame 97: nrow 96: merge.data.frame 95: merge
 
    