Use this tag for questions related to the reactable package. The reactable package provides functions to create interactive data tables in the R programming language, based on the React Table library and made with reactR.
Questions tagged [reactable]
180 questions
3
votes
2 answers
Converting reactable to ggplot, is this possible?
I've currently got a reactable stored as an object in some code. I'd like to be able to convert said object into a ggplot, but no matter what I do, I get variations of the same error.
Using blastula's add_ggplot function, I get:
Error in…

alec22
- 735
- 2
- 12
3
votes
0 answers
Set Default Filter to Reactable Table in R
Reactable package for R has introduced the capability to custom filter columns.
Reactable Custom Filtering
There are some great examples at the the above link of how to add a drop down (select) list to a specific column however I'm finding it…

Morts81
- 419
- 3
- 13
3
votes
2 answers
reactable R shiny conditional color columns on updateData
I have a shiny app which uses reactable to display the status of a task. The information is color-coded for a status column, the data is updated using updateReactable().
Initially the color-background is correct (eg red for open, green for done),…

David
- 9,216
- 4
- 45
- 78
3
votes
0 answers
Add a bar plot to a reactable
I'm trying to use a bar chart inside a reactable, but I'm having a hard time getting the chart into the totalizers. Here's an example:
library(reactable)
library(htmltools)
bar_chart <- function(label, width = "100%", height = "16px", fill =…

Rcoster
- 3,170
- 2
- 16
- 35
3
votes
0 answers
nested reactable to stay expanded when input data change shiny
I am making a shiny app where the user selects objects and data in selected objects sums to totals in a nested reactable table. I am using a reactible table, with DT tables nested inside (maybe not ideal, but in the real app I need some…

Jake L
- 987
- 9
- 21
3
votes
1 answer
Passing map() .x to a function
This might seem like a silly question, but for the life of me I cannot figure it out so appreciate any help.
I am trying to pass .x (from purrr::map) to a function so in the end I get a list of functions (I will use this eventually to pass a list of…

Gakku
- 337
- 2
- 8
3
votes
1 answer
Space thousand separator and Dot decimal separator in reactable colFormat
I am using {reactable} along with colFormat feature to format a table to my needs.
However, for some columns, I need specifically space as thousand separator and dot as decimal separator.
Both thousand and decimal separators depend on the locales…

kenshuri
- 472
- 3
- 11
3
votes
1 answer
Add line break to column group name in reactable
I am making a table with reactable in R markdown and I want a column group with a line break. Minimal example is here:
---
output: pdf_document
---
```{r, echo=F}
library(reactable)
data = mtcars[1:4, 1:4]
reactable(
data,
columnGroups =…

user1713174
- 307
- 2
- 7
3
votes
1 answer
R - reactable aggregate sum of subgroups count
I'm using the reactable package in R to display data sorted by multiple groups.
Is there a way to display the sum of all counts of all given subgroups?
Here is an example:
data("diamonds")
diamonds$id <- 1:nrow(diamonds)
reactable::reactable(data =…

Eike
- 98
- 5
3
votes
1 answer
How can i tell my modalDialog to be automatic closed when an input changes (eg. a tab changes)?
I have this Shiny App with a navbarPage and two tabPanels. In the first tab i have an actionLink which initializes a modalDialog including a reactable with cells as buttons. When i click on a button from the table i want to change the input from my…

werN
- 109
- 7
3
votes
1 answer
How to differentiate between buttons in R/Shiny reactable javascript callback?
Take this example from the reactable documentation (interactive Shiny example provided at link):
data <- cbind(
MASS::Cars93[1:5, c("Manufacturer", "Model", "Type", "Price")],
details = NA
)
reactable(
data,
columns = list(
# Render a…

Kyle Weise
- 869
- 1
- 8
- 29
3
votes
2 answers
r - how do I print ggplot objects from a nested tibble in a reactable with expandable rows?
I have a tibble in R with nested rows and I created a ggplot object per row. I would like to print these graphics using reactable's expandable rows feature.
I think an example will explain this best. I'll use iris for simplicity. First, we take…

user1713174
- 307
- 2
- 7
3
votes
1 answer
Reactable Aggregate Function for Multiple Groups
Using the R reactable package, I am trying to display the percentage of flagged readings using two groupBy variables. On the lower level of grouping, this is calculating the correct percentage. On the second (outer) level of grouping though, it is…

setty
- 425
- 3
- 18
2
votes
1 answer
Is there a way to get 'weighted mean' in reactable groupBy in a shiny app?
I want to generate a reactable in my app, group the table using the groupBy argument and in the groups get the weighted mean for each one.
The function reactable::colDef() offers a list of options of summary: mean, sum, max, min, median, count,…

Guilherme Fonseca
- 75
- 4
2
votes
2 answers
selectInput for every row in shiny app using reactable
I am trying to create a dynamic table in shiny using reactable where any time "Sell" is selected in a given row in the transaction column, the corresponding row in the quantity column changes to zero.
I am able to generate a selectInput in any row,…

James
- 65
- 4