sanitize.colnames.function = getOption("xtable.sanitize.colnames.function",\r
sanitize.text.function),\r
math.style.negative = getOption("xtable.math.style.negative", FALSE),\r
+ math.style.exponents = getOption("xtable.math.style.exponents", FALSE),\r
html.table.attributes = getOption("xtable.html.table.attributes", "border=1"),\r
print.results = getOption("xtable.print.results", TRUE),\r
format.args = getOption("xtable.format.args", NULL),\r
result[i] <- gsub("-", "$-$", result[i], fixed = TRUE)\r
}\r
}\r
+ if ( math.style.exponents ) {\r
+ for(i in 1:length(x)) {\r
+ result[i] <- gsub("^\\$?(-?)\\$?([0-9.]+)[eE]\\$?(-?)\\+?\\$?0*(\\d+)$",\r
+ "\\\\ensuremath{\\1\\2 \\\\times 10^{\\3\\4}}", result[i])\r
+ }\r
+ }\r
return(result)\r
}\r
sanitize.final <- function(result) {\r