FreesearchR/man/import-file.Rd

39 lines
1.1 KiB
Text
Raw Normal View History

2025-03-11 13:42:57 +01:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import-file-ext.R
\name{import-file}
\alias{import-file}
\alias{import_file_ui}
\alias{import_file_server}
\title{Import data from a file}
\usage{
import_file_ui(
id,
title = "",
2025-03-11 13:42:57 +01:00
preview_data = TRUE,
file_extensions = c(".csv", ".txt", ".xls", ".xlsx", ".rds", ".fst", ".sas7bdat",
".sav"),
layout_params = c("dropdown", "inline")
)
import_file_server(
id,
btn_show_data = TRUE,
show_data_in = c("popup", "modal"),
trigger_return = c("button", "change"),
file_extensions_text = paste(c(".csv", ".txt", ".xls", ".xlsx", ".rds", ".fst",
".sas7bdat", ".sav"), collapse = ", "),
2025-03-11 13:42:57 +01:00
return_class = c("data.frame", "data.table", "tbl_df", "raw"),
2025-03-17 15:00:13 +01:00
reset = reactive(NULL)
2025-03-11 13:42:57 +01:00
)
}
\arguments{
\item{preview_data}{Show or not a preview of the data under the file input.}
\item{file_extensions}{File extensions accepted by \code{\link[shiny:fileInput]{shiny::fileInput()}}, can also be MIME type.}
\item{layout_params}{How to display import parameters : in a dropdown button or inline below file input.}
}
\description{
Let user upload a file and import data
}