ropensci / skimr

A frictionless, pipeable approach to dealing with summary statistics
https://docs.ropensci.org/skimr
1.1k stars 78 forks source link

Pkgdown is failing #700

Closed elinw closed 2 years ago

elinw commented 2 years ago

Hi @michaelquinn32

The pkgdown is failing

Error in `.f()`:
! Failed to parse Rd in focus.Rd
ℹ no applicable method for 'replay_html' applied to an object of class "c('one_skim_df', 'tbl_df', 'tbl', 'data.frame')"
Caused by error in `UseMethod()`:
! no applicable method for 'replay_html' applied to an object of class "c('one_skim_df', 'tbl_df', 'tbl', 'data.frame')"

I don't think this matters for CRAN but do you have any clue? Or @maelle do you know?

maelle commented 2 years ago

:wave: @elinw (and @michaelquinn32)!

Interesting :sweat_smile: I see https://github.com/r-lib/pkgdown/issues/677

Does the one_skim_df have a print method? I'll try to write a reprex for downlit. :thinking:

maelle commented 2 years ago

A reprex would be this code

code <- "# Compare
iris %>%
  skim() %>%
  dplyr::select(n_missing)

iris %>%
  skim() %>%
  focus(n_missing)

# This is equivalent to
iris %>%
  skim() %>%
  dplyr::select(skim_variable, skim_type, n_missing)"

downlit::evaluate_and_highlight(code)
maelle commented 2 years ago
code <- "
library(skimr)
# Compare
iris %>%
  skim() %>%
  dplyr::select(n_missing)

iris %>%
  skim() %>%
  focus(n_missing)

# This is equivalent to
iris %>%
  skim() %>%
  dplyr::select(skim_variable, skim_type, n_missing)"

downlit::evaluate_and_highlight(code)
#> Error in UseMethod("replay_html", x): pas de méthode pour 'replay_html' applicable pour un objet de classe "c('one_skim_df', 'tbl_df', 'tbl', 'data.frame')"

Created on 2022-04-19 by the reprex package (v2.0.1)

maelle commented 2 years ago

Maybe https://github.com/r-lib/pkgdown/issues/677#issuecomment-955025248 is a good thing to try (i.e. returning the object invisibly if not already the case)

elinw commented 2 years ago

Thank you for all of this. I'm going to try the invisibility approach. We do have custom objects and I guess something must have changed. We only build the site on a merge to main, so it has been a while.

elinw commented 2 years ago

@michaelquinn32 It looks to me like we need an explicit print.one_skim_df() function. I tried a bit but hit a dead end.

elinw commented 2 years ago

@michaelquinn32 I'm going to create a new issue, I thin we need to do a quick new release that I'll explain there.

michaelquinn32 commented 2 years ago

Fixed with the release of 2.1.4