initialize header_alignments in a clearer way

This commit is contained in:
Barbara Borges Ribeiro
2016-03-12 17:36:01 +00:00
parent cc406262ac
commit 0896b2f7b8

View File

@@ -177,7 +177,7 @@ renderTable <- function(expr, striped=FALSE, condensed=TRUE,
# Create a vector whose i-th entry corresponds to the i-th table variable
# alignment (substituting "l" by "left", "c" by "center" and "r" by "right")
header_alignments <- c()
header_alignments <- character(0)
for (i in seq_len(nchar(cols))) {
header_alignments[i] <- {
if (substr(cols, i, i) == "l") "left"