Search code examples
rgridextramonospace

R: How to use monospaced (fixed width) font in grid.table?


I want to display my grid.table in monospaced (fixed width) fonts.

How shall I specify this? Is it any particular fonts to be used, or any other arguments?

Thank you


Solution

  • grid.table(head(iris), theme=ttheme_default(base_family="monospace"))
    

    iris

    This will use your system monospace font, which, in my case, is Cousine. Feel free to change it as you wish.