| read_sub | R Documentation |
tibbleRead in the lines in .file, (optionally) identify the first line to
match .pattern and starting here read into a
tibble with .delim as separator and clean names
via clean_names. All lines
are read in if no .pattern is passed (the default).
read_sub(.file, .pattern = NULL, .delim = ",", ...)
.file |
A path to a file or a connection. |
.pattern |
Pattern to look for. |
.delim |
Single character used to separate fields within a record. |
... |
Further arguments passed to |
A tibble.
lines <- c( "key_1,val_1", "key_2,val_2", "", "y,x_1,x_2", "1,low,0.989", "0,medium,-1.923" ) temp_file <- tempfile() writeLines(lines, temp_file) read_sub(temp_file, "(?=.*y)(?=.*x_1)(?=.*x_2)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.