updated vignette and formatting

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-18 16:26:10 +01:00
commit 4e7af7d01f
No known key found for this signature in database
5 changed files with 97 additions and 33 deletions

View file

@ -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
}