cat.import | R Documentation |
cat.import(file, ...)
file |
full file path |
... |
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (file, ...)
{
type = stringr::str_extract(file, "[^.]*$")
if (type == "xlsx") {
l <- dots_f(list(readxl = "read_excel"), list(...))
if (is.null(l$sheet))
l$sheet = 1
l = c(list(file), l)
out = data.table::setDT(do.call(readxl::read_excel, l))
}
else {
l <- dots_f(list(data.table = "fread"), list(...))
l = c(list(file), l)
out = do.call(data.table::fread, l)
}
out[out == ""] <- NA
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.