use tools file_ext instead of own

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-11-18 14:41:30 +01:00
parent 954f58bf1d
commit 9a069a422f
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View File

@ -17,6 +17,9 @@
#' \item{age_integer}{Age integer, numeric}
#' \item{sex}{Legal sex, character}
#' \item{cohabitation}{Cohabitation status, character}
#' \item{con_calc}{con_calc}
#' \item{con_mrs}{con_mrs}
#' \item{consensus_complete}{consensus_complete}
#' \item{hypertension}{Hypertension, character}
#' \item{diabetes}{diabetes, character}
#' \item{region}{region, character}

View File

@ -22,7 +22,7 @@ shiny_cast <- function(...) {
#' Helper to import files correctly
#' DEPRECATED Helper to import files correctly
#'
#' @param filenames file names
#'
@ -49,7 +49,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 <- file_extension(file)
ext <- tools::file_ext(file)
tryCatch(
{

View File

@ -2,7 +2,7 @@
% Please edit documentation in R/shiny_cast.R
\name{file_extension}
\alias{file_extension}
\title{Helper to import files correctly}
\title{DEPRECATED Helper to import files correctly}
\usage{
file_extension(filenames)
}
@ -13,7 +13,7 @@ file_extension(filenames)
character vector
}
\description{
Helper to import files correctly
DEPRECATED Helper to import files correctly
}
\examples{
file_extension(list.files(here::here(""))[[2]])[[1]]