How to make figure bigger than body column width in Quarto - r

According to the Quarto docs, the figure below should be screen-width but instead it is just positioned at the left-hand side of the screen. How can I make it bigger? Adding #| layout-ncol: 1 doesn't help either.
---
title: "Test"
format: html
---
```{r}
#| column: screen
plot(pressure)
```

The generated image is not big enough to fill the full screen. Try the out-width parameter to scale the image (docs). For best results, choose a vector-graphic format to ensure smooth scaling of the image.
```{r}
#| column: screen
#| out-width: 100%
#| fig-format: svg
plot(pressure)
```

Related

R Flexdashboard: Navigation captions don't show up in hidden storyboard

I am building a Flexdashboard. On the start page there should be links leading to several hidden storyboard (i.e. so that the storyboards do not show up in the navigation bar at the top).
However, it appears that using {.hidden} on a storyboard page interferes with the navigation captions: only the first caption of three is visible: Screenshot
Using the arrows one can still access all three graphs but without the captions.
Does anybody know how to make hidden storyboard-pages work?
I am using R 4.2.0; Flexdashboard 0.5.2; RStudio 2022.02.1
Reproducible example:
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Start page
===========================================================
[Link](#storyboard)
Storyboard{.storyboard .hidden}
===========================================================
### Chart A
```{r}
boxplot(mtcars$mpg)
```
### Chart B
```{r}
boxplot(mtcars$cyl)
```
### Chart C
```{r}
boxplot(mtcars$hp)
```

Can you top align a plot or image in R Markdown's flexdashboard?

---
title: "How do you top align this figure below?"
output: flexdashboard::flex_dashboard
---
```{r c1, fig.width=9}
plot(mtcars)
```
The R flexdashboard code above generates a plot that is centered vertically when I maximize my dashboard window. It looks like this.
Instead, I want the image to be vertically top aligned, with no white space above the image. It would look like the image below, with any spare white space placed below the image (should your window be maximized). If your output doesn't quite match mine just resize your output window to be tall and thin (think of rotated "coding" monitors).
The R Markdown argument fig.align only has horizontal options (left, right, center) and the flexdashboard argument .no-padding doesn't seem to help.
How do I get flexdashboard to top align within R Markdown?
You could use css to override the background position of the image.
---
title: "Flex"
author: ""
output:
flexdashboard::flex_dashboard:
orientation: rows
css: styles.css
---
Page One
=======================================================================
Row
-----------------------------------------------------------------------
### chart1
```{r, fig.width=12}
plot(mtcars)
```
styles.css (in same working directory):
.image-container {
background-position: center top !important;
}

R DT clips table selection buttons (when text is added to body)

Actual Behavior - Clipping
I'm using the R DT package with flexdashboard. When I add text to the body of a DT table, the bottom of the dashboard is clipped (to varying extents). See below.
---
title: "With text in the body the bottom is clipped"
output: flexdashboard::flex_dashboard
---
Notice at the bottom that "Showing X entries" and "Previous/Next" are both clipped
```{r}
library(DT)
datatable(mtcars)
```
Expected Behavior - No Clipping
If I remove the text from the body of my table everything behaves as expected. But I want my body text ¯_(ツ)_/¯. What to do?
Is this a bug I should report, or is there another solution I'm unaware of?
---
title: "Without text in the body nothing is clipped"
output: flexdashboard::flex_dashboard
---
```{r}
library(DT)
datatable(mtcars)
```
Version Info:
other attached packages:
[1] DT_0.16 flexdashboard_0.5.2
used this link for intel just adding ### in the chart, helped align the table with Flexdashboard margins
---
title: "With text in the body the bottom is clipped"
output: flexdashboard::flex_dashboard
---
Notice at the bottom that "Showing X entries" and "Previous/Next" are both clipped
###
```{r }
library(DT)
datatable(mtcars)
```

R Markdown: Responsive image with link

I'm working with R Markdown in a dashboard containing several tabs. In some of those tabs I want to display only an image with a link to a webpage. I managed to do this with this code:
---
title: "MyDashboard"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
logo: Logo.png
favicon: Favicon.png
---
```{r setup, include=FALSE}
library(flexdashboard)
```
Row {data-height=350}
-------------------------------------
### THIS TAB CONTAINS NORMAL CONTENT
```{r}
plot(example)
```
Row {data-height=650}
-------------------------------------
### THIS TAB CONTAINS AN IMAGE WITH LINK
```{r}
```
[<img src="image.png" style="width:100%; height=100%">](https://webpage.com/)
This displays the image with the link as expected, but when knitted, the image doesn't adjust to the tab's size and depending on the browser I use, vertical and horizontal scrollbars appear.
I would need to fit the image inside the limits of the tab in every browser I use, but all I tried until now failed.
Any help would be appreciated.

r knit word document plots automatically re-sized

I am trying to add a plot to a word document. I would like the plot to maximize the area available when the page size is set to legal with narrow margins. I can set the fig.width and fig.height but it seems the plots get automatically re-sized to fit the default page size (letter) with normal margins.
Here is a sample .rmd file that produces the same results:
---
title: "plot-resize"
output: word_document
---
Plot with the height set to 3" and the width to 7.5":
```{r, echo = FALSE, fig.height=3, fig.width=7.5, warning=FALSE, message=FALSE}
plot(cars)
```
However when the word document is created the image is automatically
re-sized to 79% of this.
I can re-size the plot in word, but it would be nice to not have to.
Is there a way to set the page size and margins in the .rmd file?
Is there a way to ensure that the plots stay at the specified size even if they do not fit within the margins of the created word document?
You can redo the MS Word template file - see http://rmarkdown.rstudio.com/articles_docx.html - you would have to change your margins to narrow (0.5") in the MS Word template file you are using (Under the Layout ribbon). Then, right click on the figure and select size and position, and then adjust scale height and width to 100%. You would then have to save your template file (and don't forget to close it!) and then add this to your YAML:
title: "plot-resize"
output:
word_document:
reference_docx: mynew_template.docx

Resources