new line in a column of a datatable

2,226 views
Skip to first unread message

adrie...@hotmail.com

unread,
Apr 30, 2015, 7:29:06 AM4/30/15
to shiny-...@googlegroups.com
Hello,
I don't get to to begin a new paragraph in one colum of a datatable.

library(shiny)
library
(DT)
shinyUI
(navbarPage(
        datatable
(  data.frame(species=c("A.**new line** thaliana","Caenorhabditis **new line**elegans")))
))


Yihui Xie

unread,
Apr 30, 2015, 1:05:35 PM4/30/15
to adrie...@hotmail.com, shiny-discuss
In HTML, <br/> means a line break. For DT::datatable(), you have to
use escape = FALSE so that HTML special entities are not escaped. Here
is a minimal example:

library(DT)
datatable(data.frame(species=c("A.<br/> thaliana", "Caenorhabditis
<br/>elegans")), escape=FALSE)

Regards,
Yihui

adrie...@hotmail.com

unread,
May 4, 2015, 4:32:50 AM5/4/15
to shiny-...@googlegroups.com, adrie...@hotmail.com

Thank you !

adrie...@hotmail.com

unread,
May 6, 2015, 10:19:08 AM5/6/15
to shiny-...@googlegroups.com, adrie...@hotmail.com
How do we know for an a href ?
Reply all
Reply to author
Forward
0 new messages