as.cell_addr {cellranger} | R Documentation |
Convert to a cell_addr object
Description
Convert various representations of a cell reference into an object of class
cell_addr
. Recall that cell_addr
objects hold
absolute row and column location, so ra_ref
objects or cell
reference strings with relative or mixed references will raise a warning and
generate NA
s.
Usage
as.cell_addr(x, ...)
as.cell_addr_v(x, ...)
## S3 method for class 'ra_ref'
as.cell_addr(x, ...)
## S3 method for class 'list'
as.cell_addr_v(x, ...)
## S3 method for class 'character'
as.cell_addr(x, fo = NULL, strict = TRUE, ...)
## S3 method for class 'character'
as.cell_addr_v(x, fo = NULL, strict = TRUE, ...)
Arguments
x |
a cell reference |
... |
further arguments passed to or from other methods |
fo |
either |
strict |
logical, affects reading and writing of A1 formatted cell
references. When |
Value
a cell_addr
object
Examples
as.cell_addr(ra_ref())
rar <- ra_ref(2, TRUE, 5, TRUE)
as.cell_addr(rar)
## mixed reference
rar <- ra_ref(2, FALSE, 5, TRUE)
as.cell_addr(rar)
ra_ref_list <-
list(ra_ref(), ra_ref(2, TRUE, 5, TRUE), ra_ref(2, FALSE, 5, TRUE))
as.cell_addr_v(ra_ref_list)
as.cell_addr("$D$12")
as.cell_addr("R4C3")
as.cell_addr(c("$C$4", "$D$12"))
as.cell_addr("$F2")
as.cell_addr("R[-4]C3")
as.cell_addr("F2", strict = FALSE)