mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 05:07:30 +02:00
updated vignette and formatting
This commit is contained in:
parent
0c3286cb2f
commit
4e7af7d01f
5 changed files with 97 additions and 33 deletions
|
|
@ -31,11 +31,13 @@ shiny_cast <- function(...) {
|
|||
#'
|
||||
#' @examples
|
||||
#' file_extension(list.files(here::here(""))[[2]])[[1]]
|
||||
#' file_extension(c("file.cd..ks","file"))
|
||||
#' file_extension(c("file.cd..ks", "file"))
|
||||
file_extension <- function(filenames) {
|
||||
sub(pattern = "^(.*\\.|[^.]+)(?=[^.]*)", replacement = "",
|
||||
filenames,
|
||||
perl = TRUE)
|
||||
sub(
|
||||
pattern = "^(.*\\.|[^.]+)(?=[^.]*)", replacement = "",
|
||||
filenames,
|
||||
perl = TRUE
|
||||
)
|
||||
}
|
||||
|
||||
#' Flexible file import based on extension
|
||||
|
|
@ -74,4 +76,3 @@ read_input <- function(file, consider.na = c("NA", '""', "")) {
|
|||
|
||||
df
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue