You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know much about wrappers and methods. This seems to solve my issue:
library(htmlTable)
data(iris)
htmlTable.data.frame<-function(x, ...) {
# Convert all factors to characters to print them as they expectedi<- sapply(x, is.factor)
x[i] <- lapply(x[i], as.character)
htmlTable:::htmlTable.default(x,...)
}
htmlTable(iris)
Thanks for this package. I was just trying it with a data frame and I found an issue:
The generated table shows the Species column as an integer column. I expected it to be shown as a character.
As a workaround I can convert the factor to character
But it would be nice if htmlTable did that for me. Is it feasible to implement this?
The text was updated successfully, but these errors were encountered: