Flexdashboard - Scroll multiple graphs written under a single R chunk - r

I'm trying to create a flexdashboard with several tabs. One of them needs to include multiple graphs (~50). I produce the graphs under one single chunk within a loop (because numbers of graphs varies each time). What I get in the output is showing only some graphs without being able to scroll to see the rest of them. Scroll is totally deactivated but graphs are printed.
So far I've tried and didn't work to:
change the vertical_layout = scroll
adjust the row-height but graphs got shrunk (not readable)
download latest version of flexdashboard
include some CSS style (overflow-x: scrollbar;)
run the same in simple rmakrdown and works fine
when you put each graph in different chunk, scroll works properly but it doesn't solve my problem
Any ideas?
Thank you

Related

Vega-lite kibana autosize with concat not working

I am trying to concatenate views using hconcat with vega-lite (4.17) in kibana (7.12). So far so good, however when I set autosize to none (as requested in kibana vega-lite) my plots disappear. If I set the autosize to pad (or even fit), the plots can be seen but with two horizontal bars showing two errors: Width "container" only works for single views and layered views, and the same error for height. I am not sharing any code here because it does work in vega editor, but not in kibana. At this point, I am just hoping for a workaround, so any ideas will be more than welcome! Thanks!
(Just for reference here is a ss of the errors)

Can you flip a Shiny Gauge vertically?

I’d like to put two Shiny gauges on top of one another but then have the bottom gauge plot be flipped so that the two plots make a circle - I’ve tried Googling, but to no avail... wondering if someone has done this before and if it’s possible - I’m open to other packages, but I just really like the look of the Shiny Gauges :)

R Markdown Knitting to PDF Format Question

This is a two-part question, both parts are probably simple:
Why do my comments appear between the code and the output? I'd rather it display as I type it. For instance:
Gives the output:
But I would prefer the "We have 7 classes of data..." line to go above the code in the PDF.
Using the second picture from above, why does the gray box containing the code in have a larger border above the code than below? I'd rather the top have the same size border as the bottom.
I'm assuming this is an easy setting to change but I can't figure it out.

Viewer pane is printing in the wrong dimensions

My plots are showing up with the titles way too zoomed it. They are printing like my available space is much smaller than it really is. It was working fine before. I've tried to reset it with dev.off() and par(mfrow=c(2,2)).
plot(mtcars$mpg)
Do you see how the dimensions are weird? I've also tried to clear the preivous plots.
This is the same plot printed on another computer with the viewerport set to about the same size.

rmarkdown adding blank space around headers when knitting to PDF

I am encountering a weird issue where when I knit my markdown document to a pdf, some of the headers/figures are having a bunch of line breaks/spaces buffered above and below them (see image below for both code and knit document). I cannot figure out why this is occurring. I have checked the spaces above and below the headers and nearby chunks to make sure they are consistent, as I know this can sometimes cause similar issues, to no avail. There are some headers that are seemingly unaffected, and I tried to copy/paste those over the ones that are, and yet when doing so they also get the breaks added in that space.
When removing the code chunks for my plots, however, these mysterious spacings disappear.
Any suggestions would be greatly appreciated.
EDIT:
I believe I've solved the issue, and will leave this here in case anyone has similar issues in the future. I believe the buffers are being added around the headers under which the code chunks are placed because the image would otherwise be cutoff or not fit on the page in that location. Since markdown does not want the image to be cut off, it adds a space buffer to make sure it will fit on the page. You can work around this by either changing the size of the image or the location to make sure that it will fully fit on one page without being cut off.

Resources