# Connection --------------------------------------------------------------
#' Connect to a datasource
#'
#' @param x what to connect to
#' @param ... other args passed to methods
#' @export
connect <- function(x, ...) {
UseMethod("connect")
}
#' Disconnect from a datasource
#'
#' @param x what to disconnect from
#' @param ... other args passed to methods
#' @export
disconnect <- function(x, ...) {
UseMethod("disconnect")
}
#' Check whether connection is connected
#'
#' @param x a connection
#' @param ... other args passed to methods
#' @export
is_connected <- function(x, ...) {
UseMethod("is_connected")
}
#' Print connection
#'
#' @name print_connection
#' @param x connection
#' @param ... args passed onto methods
NULL
#' @rdname print_connection
#' @export
con_print_header <- function(x, ...) {
UseMethod("con_print_header")
}
#' @rdname print_connection
#' @export
con_print_body <- function(x, ...) {
UseMethod("con_print_body")
}
#' @rdname print_connection
#' @export
con_print_footer <- function(x, ...) {
UseMethod("con_print_footer")
}
# Methods -----------------------------------------------------------------
#' Read a dataset
#'
#' @param src datasource
#' @param name name of dataset
#' @param ... other args passed to methods
#' @export
read_dataset <- function(src, name, ...) {
UseMethod("read_dataset")
}
#' Write a dataset
#'
#' @param dest datasource
#' @param name name of dataset
#' @param x data to write
#' @param ... other args passed to methods
#' @export
write_dataset <- function(dest, name, x, ...) {
UseMethod("write_dataset")
}
#' Remove a dataset
#'
#' @param loc datasource
#' @param name name of dataset
#' @param ... other args passed to methods
#' @export
remove_dataset <- function(loc, name, ...) {
UseMethod("remove_dataset")
}
#' List datasets
#'
#' @param src datasource
#' @param ... other args passed to methods
#' @export
list_datasets <- function(src, ...) {
UseMethod("list_datasets")
}
exists_dataset <- function(src, name, ...) {
UseMethod("exists_dataset")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.