mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 13:17:30 +02:00
cleaning
This commit is contained in:
parent
40d95e41c3
commit
ae1c120cd8
4 changed files with 30 additions and 16 deletions
|
|
@ -50,7 +50,7 @@ file_extension <- function(filenames) {
|
|||
#' @examples
|
||||
#' read_input("https://raw.githubusercontent.com/agdamsbo/cognitive.index.lookup/main/data/sample.csv")
|
||||
read_input <- function(file, consider.na = c("NA", '""', "")) {
|
||||
ext <- tools::file_ext(file)
|
||||
ext <- tolower(tools::file_ext(file))
|
||||
|
||||
tryCatch(
|
||||
{
|
||||
|
|
@ -66,7 +66,7 @@ read_input <- function(file, consider.na = c("NA", '""', "")) {
|
|||
df <- readr::read_rds(file = file)
|
||||
}else {
|
||||
stop("Input file format has to be on of:
|
||||
'.csv', '.xls', '.xlsx', '.dta', '.rds' or '.ods'")
|
||||
'.csv', '.xls', '.xlsx', '.dta', '.ods' or '.rds'")
|
||||
}
|
||||
},
|
||||
error = function(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue