How can I reduce the size of R output to fit into a single slidify slide?

137 views Asked by At

I've started using slidify to create a presentation for a course. However, when I print the output from a GLM it doesn't all fit on the page, it gets cut off at the bottom. How can I modify slidify to fix this? Here's the problem code:

icecream <- data.frame(
  temp=c(11.9, 14.2, 15.2, 16.4, 17.2, 18.1, 
         18.5, 19.4, 22.1, 22.6, 23.4, 25.1),
  units=c(185L, 215L, 332L, 325L, 408L, 421L, 
          406L, 412L, 522L, 445L, 544L, 614L)
  )

model1 <- glm(units ~ temp, data=icecream, 
              family=gaussian(link="identity"))
1

There are 1 answers

0
adkane On BEST ANSWER

I found the answer here https://github.com/ramnathv/slidify/issues/158

I copied slidify.css from libraries/frameworks/io2012/css to assets/css. Here I changed the font size from 100% to 60% as follows:

code {
  font-size: 60%;
  font-family: "Source Code Pro", monospace;
  color: darkred;
}