Description Usage Arguments Details Value See Also
A connection to the file filename is created. Column types have to be specified. These are not determined automatically as for example read.fwf does. This has been done to increase speed.
1 2 3 4 5 6 7 8 9 |
filename |
character containing the filename of the CSV-file. |
column_types |
character vector containing the types of data in each of the columns. Valid types are: double, integer, categorical and string. |
column_widths |
numeric vector containing the width in number of character of each of the columns. |
column_names |
optional character vector containing the names of the columns. |
dec |
optional character specifying the decimal mark. |
trim |
optional logical specifying whether or not whitespace at the end of factor levels or character strings should be trimmed. |
ignore_failed_conversion |
ignore (set to |
After the connection is created data can be extracted using indexing (as in a normal data.frame) or methods such as read_lines and next_block can be used to read in blocks. For processing the file in blocks the (faster) convenience function process_blocks can be used.
Only use ignore_failed_conversion
when you are sure that the column
specification is correct. Otherwise, this option can hide an incorrect
specification.
Object of type laf
. Values can be extracted from this object
using indexing, and methods such as read_lines
, next_block
.
See read.fwf
for conventional access of fixed width files.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.