| read_source | R Documentation |
The first row is always taken as the header. Excel formulas are read as their cached values; cell formatting (colours, merged cells, number formats) is not read. CSV files are read with an auto-detected delimiter (comma, semicolon, tab or pipe) and encoding (Hungarian Excel exports are often semicolon-separated windows-1250).
read_source(
path,
sheet = NULL,
guess_max = 1e+05,
delim = NULL,
encoding = NULL
)
path |
Path to an |
sheet |
Sheet name or index for Excel files (default: first sheet). |
guess_max |
Rows used by readxl to guess the original column types, which are only used to restore cell types on writing. |
delim, encoding |
CSV only; |
A synth_source list: raw (data.frame of character, internal
unique names), orig_names (header as on disk, duplicates allowed),
orig_class (readxl/readr guessed class per column), path, sheet,
format, and for CSV delim and encoding.
df <- data.frame(id = sprintf("AB%03d", 1:60), value = 1:60,
code = rep(c(0, 1, NA), 20))
path <- file.path(tempdir(), "read_source.csv")
utils::write.csv(df, path, row.names = FALSE, na = "")
src <- read_source(path)
head(src$raw)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.