ModuleImportServer | R Documentation |
The server function of the CSV import module
ModuleImportServer( Id, Mode = .ImpModes, ColSpec = NULL, FileSpec = NULL, Options = NULL )
Id |
Module name space |
Mode |
Interaction mode of the module. What possibilities shall the user have to modify the way the file is to be imported? One of three options: "AsIs", "Desired", "UserDefined". |
ColSpec |
A list specifying the columns to import. |
FileSpec |
A list describing the expected CSV format. (see details). |
Options |
Use |
ColSpec
can have different formats. It can be a col_spec
object (see readr::cols_condense()
),
a tibble or a named list with the following format:
A list of variable (i.e. column) names that shall replace the column heads in the file (character vector).
A list of column heads in the CSV file (character vector).
The data types of each variable (character vector). If no value (i.e. falsy values) is given, it will be guessed.
An additional format specification (character vector).
That is supported by "datetime", "date", and "time". If none
is given the Expected
options are used.
FileSpec
can have these fields:
Language code (e.g. "de" or "en)
Does the CSV file have a header? (TRUE
(default)/FALSE
;
see utils::read.csv()
argument header
). If a column specification
is available, Header
will be coerced to TRUE
.
A character separating columns (
see utils::read.csv()
argument sep
)
The character that separates thousands in numbers.
The character used decimal points in the file
(see utils::read.csv()
argument dec
)
Format used for dates in the file
(format specification by base::strptime()
).
Format used for temporal data in the file
(format specification by base::strptime()
).
Character to identify text,
see utils::read.csv()
argument quote
Convert all strings to factors (TRUE
/FALSE
is default;
see utils::read.csv()
argument stringsAsFactors
).
A data frame containing the uploaded CSV file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.