Git Product home page Git Product logo

Comments (2)

dcomtois avatar dcomtois commented on July 30, 2024 1

Hi Cecile, thanks for your feedback. This has to do with css... Check out the following vignette which gives working examples:

https://cran.r-project.org/web/packages/summarytools/vignettes/Recommendations-rmarkdown.html

The line feeds are there (we can't put <br>'s inside a table cell per html specifications), there just needs to be a style element to tell the browser not to ignore them... Specifically, this is how summarytools does it: it includes this "chunk" in its css file (summarytools.css):

.st-multiline {
  white-space: pre;
}

... and the class "st-multiline" is given to dfSummary tables. If you look at the source html after for instance print(dfSummary(iris), file = "~/test.html"), you'll see it.

See the vignette and this link for another explanation: https://stackoverflow.com/questions/10937218/how-to-show-multiline-text-in-a-table-cell

... and let me know how this goes!

Edit: I realize this can be tedious... I'll explore an avenue using the <pre> tag as discussed in the Stack Overflow post, and I'll keep everyone posted.

from summarytools.

cecilesauder avatar cecilesauder commented on July 30, 2024

Hi Dominic,
I solve the problem with what you specified in the vignette, I add the summarytools.css file in the yaml and now it's work !
Thanks for your help :)
This problem was with the CRAN version of the package because with the dev-current version I couldn't render my . Rmd.
I'm going to try again you new dev-current version today.

from summarytools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.