read_csv | R Documentation |
NOTE: This function is currently not exported since some cases
cannot be tested.
Sometimes read_csv
stops reading in a csv
file after several lines without any message. This function is a wrapper
around read_csv
that counts the number of rows in the
original file and compares it with the resulting data.frame. If the numbers
of rows differ, it throws a warning.
read_csv(file, col_names = TRUE, skip = 0, n_max = Inf, ...)
file |
Either a path to a file, a connection, or literal data (either a single string or a raw vector). Files ending in Literal data is most useful for examples and tests. To be recognised as
literal data, the input must be either wrapped with Using a value of |
col_names |
Either If If Missing ( |
skip |
Number of lines to skip before reading data. If |
n_max |
Maximum number of lines to read. |
... |
arguments passed to |
write.csv(x = iris, file = "iris.csv")
read_csv(file = "iris.csv")
read_csv(file = "iris.csv", skip = 3, col_names = FALSE, n_max = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.