Rapporter / pander

An R Pandoc Writer: Convert arbitrary R objects into markdown
http://rapporter.github.io/pander/
Open Software License 3.0
294 stars 66 forks source link

emphasize.strong.rows fails #354

Closed banjialo closed 2 years ago

banjialo commented 2 years ago

The "emphasize.strong.rows" fails when there are no rows to emphasize. Example:

this works

iris iris_b <- iris[1:3, ] emphasize.strong.rows (which(iris_b$Sepal.Width > 3)) pandoc.table(iris_b)

this fails to work

iris iris_b <- iris[1:3, ] emphasize.strong.rows (which(iris_b$Sepal.Width > 4)) pandoc.table(iris_b)

Error in apply(t, c(1, 2), function(x) gsub("[[:space:]]*$", "", x)) : dim(X) must have a positive length