* Added option to produce math style exponents when sanitizing
numbers, as suggested by Don Armstrong (don@donarmstrong.com), who
also provided code
+ * Fixed bug #6907. Warning was created when the data frame as no
+ rows for type is 'html'. Added a test to create the matrix
+ requested specially in that case. Original code was
+ BTD2 <- matrix(align.tmp[(2-pos):(ncol(x)+1)],
+ nrow = nrow(x), ncol = ncol(x)+pos, byrow = TRUE)
+ which created a matrix with no rows, but gave a warning when
+ there were no rows in the data frame being processed.
+ * Fixed bug #6260. Accepted the change suggested by Claudius
+ Loehnert, which was to replace { and } by \begingroup and
+ \endgroup respectively as the delimiters when size was to changed
+ in a table.
1.8-0
if(length(grep("^\\\\", size)) == 0){\r
size <- paste("\\", size, sep = "")\r
}\r
- BSIZE <- paste("{", size, "\n", sep = "")\r
- ESIZE <- "}\n"\r
+ ## Change suggested by Claudius Loehnert reported in Bug #6260\r
+ ## BSIZE <- paste("{", size, "\n", sep = "")\r
+ ## ESIZE <- "{\n"\r
+ BSIZE <- paste("\\begingroup", size, "\n", sep = "")\r
+ ESIZE <- "\\endgroup\n"\r
}\r
BLABEL <- "\\label{"\r
ELABEL <- "}\n"\r
BTD1 <- " <td align=\""\r
align.tmp <- attr(x, "align", exact = TRUE)\r
align.tmp <- align.tmp[align.tmp!="|"]\r
- BTD2 <- matrix(align.tmp[(2-pos):(ncol(x)+1)],\r
- nrow = nrow(x), ncol = ncol(x)+pos, byrow = TRUE)\r
+ if (nrow(x) == 0) {\r
+ BTD2 <- matrix(nrow = 0, ncol = ncol(x)+pos)\r
+ } else {\r
+ BTD2 <- matrix(align.tmp[(2-pos):(ncol(x)+1)],\r
+ nrow = nrow(x), ncol = ncol(x)+pos, byrow = TRUE)\r
+ }\r
## Based on contribution from Jonathan Swinton <jonathan@swintons.net>\r
## in e-mail dated Wednesday, January 17, 2007\r
BTD2[regexpr("^p", BTD2)>0] <- "left"\r