I'm using formattable() from the package formattable in R. Here's some code that produces a table with the issue I want to get around.
a1 <- c(1, 2, 3)
data <- c(100, 155, -4)
a2 <- c(0, paste(data, collapse = "; "), 1000000)
b <- data.frame(cbind(a1, a2))
formattable(b)
Here is the output:
What I want is for the cell with the three entries to have each value on a new line, so it looks like so:
If it looked like this I could remove the semicolons. I made the second image by shrinking my window, but I want the data to always look this way no matter how big the user's window is. Is there a way in formattable() or elsewhere where this can be forced?
Note that I have tried the following in the paste() function and it did not work.
paste(data, collapse = "; \n")