readSheet | R Documentation |
Reads data from a sheet in a DataPack object. This function is
essentially a wrapper for readxl
's read_excel
function, but with additional
support for selecting default parameters per DataPack setup.
readSheet(
d,
sheet = 1,
range = NULL,
col_names = TRUE,
col_types = "text",
na = "",
guess_max = 1000,
progress = readxl::readxl_progress(),
.name_repair = "minimal"
)
d |
DataPack object, created via |
sheet |
Sheet to read. Either a string (the name of a sheet), or an
integer (the position of the sheet). Ignored if the sheet is specified via
|
range |
A cell range to read from, as described in cell-specification.
Includes typical Excel ranges like "B3:D87", possibly including the sheet
name like "Budget!B2:G14", and more. Interpreted strictly, even if the
range forces the inclusion of leading or trailing empty rows or columns.
Takes precedence over |
col_names |
|
col_types |
Either |
na |
Character vector of strings to interpret as missing values. By default, readxl treats blank cells as missing data. |
guess_max |
Maximum number of data rows to use for guessing column types. |
progress |
Display a progress spinner? By default, the spinner appears
only in an interactive session, outside the context of knitting a document,
and when the call is likely to run for several seconds or more. See
|
.name_repair |
Handling of column names. Passed along to
|
A tibble
Scott Jackson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.