Search code examples
rshinyflexdashboard

align text side by side to figure


How can I put the figure on left and text on right and align it left (the text)?

---
title: "Untitled"
author: "George"
date: "12/3/2018"
output:
    flexdashboard::flex_dashboard:
    orientation: rows
runtime: shiny
---

    ```{r global, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(flexdashboard)
library(dplyr)
library(GGally)


x <- c(1,2,3)
y <- c(11,22,33)
z <- data.frame(x, y)
```

Introduction
=======================================================================

### General info

- A

- B



Corr
=======================================================================

### Correlation

Here is some text

- One
- Two

```{r}
renderPlot({
    GGally::ggpairs(z)
})

```

Solution

  • try this, this layout fills the page completely and gives prominence to a single chart on the left where you can have your img and two secondary charts included to the right- where you can have your text

     title: "Focal Chart (Left)"
        output: flexdashboard::flex_dashboard
        ---
    
        Column {data-width=600}
        -------------------------------------
    
        ### Chart 1
    
        ```{r}
        ```
    
        Column {data-width=400}
        -------------------------------------
    
        ### Chart 2
    
        ```{r}
        ```   
    
        ### Chart 3
    
        ```{r}
        ```