- Notifications
You must be signed in to change notification settings - Fork11
Markdown Parser and Renderer for R Graphics
License
Unknown and 2 other licenses found
Licenses found
r-lib/marquee
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
marquee is a markdown parser and renderer for the R graphics engine. Itcan be used to render rich text formatted as markdown (CommonMark)inside R graphics such as ggplot2 or other graphics built on grid.
# You can install marquee from CRANinstall.packages("marquee")# Or get the development version from Github using pakpak::pak("r-lib/marquee")
The main function of the package ismarquee_grob() which creates agrob based on markdown text and a style that can be rendered with grid:
# Let's render this readmereadme<- paste(readLines("README.Rmd")[-seq_len(17)],collapse="\n")library(marquee)library(grid)fancy_style<- classic_style(body_font="baskerville",header_font="marker felt",code_font="fira code")|> modify_style("cb",background= linearGradient(colours= c("lightblue","white"),x1=0,y1=1,x2=0,y2=0 ))grob<- marquee_grob(readme,style=fancy_style)grid.draw(grob)
(The above is an image – go ahead and check)
I would be remiss to not mentiongridtext andggtext, both by Claus Wilke. Thesepackages aim to solve much the same problem as marquee, but work in adifferent way and don’t have the same powerful textshaping backend asmarquee. Most notably from a user perspective is perhaps that gridtextunderstands HTML to some degree, whereas marquee is oblivious to bothHTML and CSS. Instead, it supports thefull CommonMarkspec with the plan to add support forcustom span elements as well.
About
Markdown Parser and Renderer for R Graphics
Resources
License
Unknown and 2 other licenses found
Licenses found
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.

