as.range: Convert a cell_limits object to a cell range

Description Usage Arguments Value Examples

View source: R/cell-limits.R

Description

Convert a cell_limits object to a cell range

Usage

1
as.range(x, fo = c("R1C1", "A1"), strict = FALSE, sheet = NULL)

Arguments

x

a cell_limits object

fo

either "R1C1" (the default) or "A1" specifying the cell reference format; in many contexts, it can be inferred and is optional

strict

logical, affects reading and writing of A1 formatted cell references. When strict = TRUE, references must be declared absolute through the use of dollar signs, e.g., $A$1, for parsing. When making a string, strict = TRUE requests dollar signs for absolute reference. When strict = FALSE, pure relative reference strings will be interpreted as absolute, i.e. A1 and $A$1 are treated the same. When making a string, strict = FALSE will cause dollars signs to be omitted in the reference string.

sheet

logical, indicating whether to include worksheet name; if NULL, worksheet is included if worksheet name is not NA

Value

length one character vector holding a cell range

Examples

1
2
3
4
5
6
7
rgCL <- cell_limits(ul = c(1, 2), lr = c(7, 6))
as.range(rgCL)
as.range(rgCL, fo = "A1")

rgCL_ws <- cell_limits(ul = c(1, 2), lr = c(7, 6), sheet = "A Sheet")
as.range(rgCL_ws)
as.range(rgCL_ws, fo = "A1")

jennybc/cellranger documentation built on May 19, 2019, 4:04 a.m.