| wb_data | R Documentation |
wb_data attribute to a data frame in a worksheetprovide wb_data object as mschart input
wb_data(
wb,
sheet = current_sheet(),
dims,
header_rows = 1L,
used_range = TRUE,
...
)
## S3 method for class 'wb_data'
x[
i,
j,
drop = !((missing(j) && length(i) > 1) || (!missing(i) && length(j) > 1))
]
wb |
a workbook |
sheet |
a sheet in the workbook either name or index |
dims |
the dimensions |
header_rows |
number of rows at the top of |
used_range |
if |
... |
additional arguments for |
x |
x |
i |
i |
j |
j |
drop |
drop |
A data frame of class wb_data, or NULL if the worksheet contains no data.
wb_to_df() wb_add_mschart(), wb_add_pivot_table()
wb <- wb_workbook()
wb <- wb_add_worksheet(wb)
wb <- wb_add_data(wb, x = mtcars, dims = "B2")
wb_data(wb, 1, dims = "B2:E6")
# a header of two rows
wb <- wb_workbook()
wb <- wb_add_worksheet(wb)
wb <- wb_add_data(
wb,
x = matrix(c("A", NA, "B", NA, "x", "y", "x", "y", 1, 2, 3, 4), nrow = 3, byrow = TRUE),
col_names = FALSE
)
wb_data(wb, 1, dims = "A1:D3", header_rows = 2)
# full columns are limited to the used range
wb_data(wb, 1, dims = "A:D")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.