posit-dev / positron

Positron, a next-generation data science IDE
Other
1.18k stars 32 forks source link

Displaying Tables via modelsummary #3716

Closed joshuafayallen closed 4 days ago

joshuafayallen commented 4 days ago

Positron Version:

Positron Version: 2024.06.1 (Universal) build 27 Code - OSS Version: 1.90.0 Commit: a893e5b282612ccb2200102957ac38d3c14e5196 Date: 2024-06-26T02:08:06.673Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0

Steps to reproduce the issue:

Hi all. Loving the IDE so far! I was working on producing a table with modelsummary


library(palmerpenguins)
library(fixest)
library(modelsummary)

m1 = feols(body_mass_g ~ bill_depth_mm + bill_length_mm | species, data = penguins)

modelsummary(m1)

However when using gt it works!

library(gt)
penguins |> 
  group_by(species) |> 
  summarise(across(starts_with("bill"),  list(mean = \(x) mean(x, na.rm = TRUE),
                                            median = \(x) median(x, na.rm = TRUE)),
                                          .names = '{col}_{fn}')) |> 
  select(1:3) |> 
  gt::gt()

It may be related to a similar #3667

What did you expect to happen?

I was expecting a similar preview as you get from RStudio

image

Were there any error messages in the output or Developer Tools console?

Error: ! Function viewer not found in RStudio Show Traceback

jmcphers commented 4 days ago

I can reproduce this, thanks for the report!

The issue is that Positron doesn't yet have a local HTML file viewer. We're tracking this in #2559.