mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 13:17:30 +02:00
implemented specification of categorical variables (logicals are converted to factor)
This commit is contained in:
parent
fe9918dc10
commit
f5965a2748
4 changed files with 113 additions and 12 deletions
|
|
@ -62,10 +62,12 @@ read_input <- function(file, consider.na = c("NA", '""', "")) {
|
|||
} else if (ext == "dta") {
|
||||
df <- haven::read_dta(file = file)
|
||||
} else if (ext == "ods") {
|
||||
df <- readODS::read_ods(file = file)
|
||||
} else {
|
||||
df <- readODS::read_ods(path = file)
|
||||
} else if (ext == "rds") {
|
||||
df <- readr::read_rds(file = file)
|
||||
}else {
|
||||
stop("Input file format has to be on of:
|
||||
'.csv', '.xls', '.xlsx', '.dta' or '.ods'")
|
||||
'.csv', '.xls', '.xlsx', '.dta', '.rds' or '.ods'")
|
||||
}
|
||||
},
|
||||
error = function(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue