as.range {cellranger}R Documentation

Convert a cell_limits object to a cell range

Description

Convert a cell_limits object to a cell range

Usage

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

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")

[Package cellranger version 1.1.0 Index]