How does this differ from cell_limits? Here the input can have length greater than 2, i.e. the rows can be specified as 1:n. If the length is greater than 2, both the min and max are taken with NA.rm = TRUE. Note it is not possible to request non-contiguous rows, i.e. rows 1, 2, and 5. In this case, the requested rows will run from the minimum of 1 to the maximum of 5.

cell_rows(x)

Arguments

x

numeric vector of row limits; if length greater than two, min and max will be taken with NA.rm = TRUE

Value

a cell_limits object

Examples

cell_rows(c(NA, 3))
#> <cell_limits (1, -) x (3, -)>
cell_rows(c(7, NA))
#> <cell_limits (7, -) x (-, -)>
cell_rows(4:16)
#> <cell_limits (4, -) x (16, -)>
cell_rows(c(3, NA, 10))
#> <cell_limits (3, -) x (10, -)>

dim(cell_rows(1:5))
#> [1]  5 NA