Experiment with a for loop with less comparisons
chainsawriot opened this issue · 0 comments
chainsawriot commented
Lines 103 to 116 in 3833747
Most of the cells should not be NA
for (j in colj) {
value <- as.character(x[i, j, drop = TRUE])
type <- types[j]
if (!is.na(value)) {
.cell_out(type = type, value = value, con = con, write_empty_cell = FALSE)
next
}
## now, it's NA
if (!na_as_string) {
.cell_out(type = type, value = value, con = con, write_empty_cell = TRUE)
next
}
## na_as_string
.cell_out(type = "string", value = value, con = con, write_empty_cell = FALSE)
}