check_conn <- function(conn) {
if(!inherits(conn, "SQLiteConnection"))
stop("conn must be an SQLiteConnection", call. = FALSE)
conn
}
check_path <- function(x){
check_string(x)
path_ext <- tools::file_ext(x)
if(identical(path_ext, "")) {
return(paste0(x, ".R"))
}
if(!identical(path_ext, ".R")){
return(gsub(path_ext, "R", x))
}
}
check_listdf <- function(x){
check_list(x)
check_named(x)
if(!all(sapply(x, is.data.frame)))
stop("All elements of list must be data.frame", call. = FALSE)
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.