cell_addr: cell_addr class

Description Usage Arguments Value Reference Examples

Description

The cell_addr class is used to hold the absolute row and column location for one or more cells. An object of class cell_addr is a list with two components of equal length, named row and col, consisting of integers greater than or equal to one or NA. This is in contrast to the ra_ref class, which holds a representation of a single absolute, relative, or mixed cell reference from, e.g., a formula.

Usage

1

Arguments

row

integer. Must be the same length as col or of length one, which will be recycled to the length of col.

col

integer. Same deal as for row.

Value

a cell_addr object

Reference

Spreadsheet Implementation Technology: Basics and Extensions Peter Sestoft MIT Press 2014

Examples

1
2
3
4
5
cell_addr(4, 3)
(ca <- cell_addr(1:4, 3))
ca[2:3]
ca[[4]]
length(ca)

Example output

<cell_addr: 1 cells>
# A tibble: 1 x 2
    row   col
  <int> <int>
1     4     3

Warning message:
`as_data_frame()` is deprecated as of tibble 2.0.0.
Please use `as_tibble()` instead.
The signature and semantics have changed, see `?as_tibble`.
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated. 
<cell_addr: 4 cells>
# A tibble: 4 x 2
    row   col
  <int> <int>
1     1     3
2     2     3
3     3     3
4     4     3

<cell_addr: 2 cells>
# A tibble: 2 x 2
    row   col
  <int> <int>
1     2     3
2     3     3

<cell_addr: 1 cells>
# A tibble: 1 x 2
    row   col
  <int> <int>
1     4     3

[1] 4

cellranger documentation built on May 2, 2019, 11:26 a.m.