Skip to content

tabsets within tabset #1

@LeenSonneveld

Description

@LeenSonneveld

Thanks for the great examples.

Is is possible to extend the example by showing how to make tabset within a tabset?
E.g. for every homeworld I want a separate tab for a table and a plot.
I modifed the _child1.qmd to code below, but now all tabs are empty
When i remove the ::: {panel-tabset}, the headings and tables are shown (but not in tabs)

I also noticed that as tab_header() is added to gt, the output get corrupted

## `r hw`

::: {.panel-tabset}
### Table

```{r}
#| echo: false

starwars %>%
  filter(homeworld == hw) %>%
  count(sex) %>%
  head() %>%
  gt()

```

### Plot
```{r}
#| echo: false
#| warning: false

starwars %>%
  filter(homeworld == hw) |> 
  ggplot2::ggplot(aes(x = height, y = mass)) + 
  geom_point()
```

:::

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions