openxlsx2
openxlsx2 copied to clipboard
Inconsistent `wb_dims` return when row vector contains 1
wb_dims
gives weird dimension range when the rows
argument is a vector and the vector contains 1.
r$> packageVersion("openxlsx2")
[1] '1.8.0.9000'
r$> wb_dims(rows = c(2,30), cols = 2)
[1] "B2:B2,B30:B30"
r$> wb_dims(rows = c(1,30), cols = 2)
[1] "B1:B2"
r$> wb_dims(rows = c(2,30), cols = c(2,4))
[1] "B2:B2,D2:D2,B30:B30,D30:D30"
r$> wb_dims(rows = c(1,30), cols = c(2,4))
[1] "B1:B2,D1:D2"
r$> wb_dims(rows = c(2,1), cols = c(2,4))
[1] "B1:B2,D1:D2"
r$> wb_dims(rows = c(5,1), cols = c(2,4))
[1] "B1:B2,D1:D2"