Reputation: 63
I have created a variable x=11.5. I want now to display x in the viewer pane in RStudio.
Is there a way how to display it and adjust fonts and colors?
x <- 11.5
Upvotes: 0
Views: 617
Reputation: 44867
This is one way:
x <- 11.5
library(htmltools)
html_print(x)
This displays just the number in the viewer pane:
If you want to change fonts etc., you'd use HTML type things to do that. For example, wrap the number in <a style="font-size: 100px"></a>
using
html_print(a(x, style="font-size: 100px"))
Upvotes: 2