mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
This commit is contained in:
parent
6c44be558d
commit
912fff7474
32 changed files with 2340 additions and 273 deletions
52
man/import-file.Rd
Normal file
52
man/import-file.Rd
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
% 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 = TRUE,
|
||||
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"),
|
||||
return_class = c("data.frame", "data.table", "tbl_df", "raw"),
|
||||
reset = reactive(NULL),
|
||||
read_fns = list()
|
||||
)
|
||||
}
|
||||
\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.}
|
||||
|
||||
\item{read_fns}{Named list with custom function(s) to read data:
|
||||
\itemize{
|
||||
\item the name must be the extension of the files to which the function will be applied
|
||||
\item the value must be a function that can have 5 arguments (you can ignore some of them, but you have to use the same names),
|
||||
passed by user through the interface:
|
||||
\itemize{
|
||||
\item \code{file}: path to the file
|
||||
\item \code{sheet}: for Excel files, sheet to read
|
||||
\item \code{skip}: number of row to skip
|
||||
\item \code{dec}: decimal separator
|
||||
\item \code{encoding}: file encoding
|
||||
\item \code{na.strings}: character(s) to interpret as missing values.
|
||||
}
|
||||
}}
|
||||
}
|
||||
\description{
|
||||
Let user upload a file and import data
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue