View source: R/file_definition.R
Helper function for new_file_definition_excel()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | new_file_definition_excel_(
file_path,
specification_files = NULL,
range = NULL,
sheet,
cols = NULL,
col_names = NULL,
col_types = NULL,
file_meta = NULL,
header,
skip_rows,
na,
trim_ws,
n_max,
to_lower,
rename_cols,
adapters = new_adapters(),
cols_keep,
extra_col_name = NULL,
extra_col_val = NULL,
extra_col_file_path,
err_h,
...
)
|
file_path |
A string holding the path to the data file. |
specification_files |
An optional character vector holding the paths to the files, where the file structure is described. |
range |
An optional string, holding an EXCEL range string, defining the
data range in the spread sheet. If |
sheet |
A string or an integer number:
|
cols |
An optional list argument, holding the column definitions.
This argument can be used instead of the arguments
|
col_names |
An optional character vector holding the names of the columns.
If omitted, then the strings |
col_types |
A character vector defining the data types for each column.
The following strings are allowed: |
file_meta |
An optional file_meta class object,
holding some meta information for each data column
(column description, possible column values + descriptions of possible
column values).
For details see section meta information.
If the argument |
header |
A logical value, which defines if the first row contains
the data headers. If set to |
skip_rows |
The number of rows to be skipped. In the case of DSV or
EXCEL files: If the argument |
na |
A string representing missing values in the data file. |
trim_ws |
A logical value, defining if the character values should be stipped of all leading and trailing white spaces. |
n_max |
A number, defining the maximum number of rows to be
read. If |
to_lower |
A logical flag, defining if the names of the columns should
be transformed to lower case after reading the data set (by calling
|
rename_cols |
A logical value, which defines if the columns given in
the data file should be overwritten by the columns given in argument
|
adapters |
An optional list argument, holding a list of adapter functions (See section adapters). |
cols_keep |
Either |
extra_col_name |
An optional string, which defines the column, which
will be added to the data set (after reading it with function |
extra_col_val |
An optional value (any atomic type), which will be added
(after reading the data set with function |
extra_col_file_path |
Either |
err_h |
An error handler |
... |
Additional function arguments for
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.