#' Check if a table (collection) exists in a mongo DB.
#'
#' @name mg_table_exists
#'
#' @param table name as a character
#'
#' @return logical
mg_table_exists <- function(table) {
table %in% mongolite::mongo()$run('{"listCollections":1}')$cursor$firstBatch$name
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.