0

The skimr vignette shows the following example:

library(skimr)
skim(iris)

## Skim summary statistics
##  n obs: 150 
##  n variables: 5 
## 
## ── Variable type:factor ─────────────────────────────────────
##  variable missing complete   n n_unique                       top_counts
##   Species       0      150 150        3 set: 50, ver: 50, vir: 50, NA: 0
##  ordered
##    FALSE
## 
## ── Variable type:numeric ────────────────────────────────────
##      variable missing complete   n mean   sd  p0 p25  p50 p75 p100
##  Petal.Length       0      150 150 3.76 1.77 1   1.6 4.35 5.1  6.9
##   Petal.Width       0      150 150 1.2  0.76 0.1 0.3 1.3  1.8  2.5
##  Sepal.Length       0      150 150 5.84 0.83 4.3 5.1 5.8  6.4  7.9
##   Sepal.Width       0      150 150 3.06 0.44 2   2.8 3    3.3  4.4
##      hist
##  ▇▁▁▂▅▅▃▁
##  ▇▁▁▅▃▃▂▂
##  ▂▇▅▇▆▅▂▂
##  ▁▂▅▇▃▂▁▁

However, when I run the above code in a Jupyter notebook I get:

## variable type    stat    level   value   formatted
## Sepal.Length numeric missing .all    0.0000000000    0
## Sepal.Length numeric complete    .all    150.0000000000  150
## Sepal.Length numeric n   .all    150.0000000000  150
## Sepal.Length numeric mean    .all    5.8433333333    5.84
## Sepal.Length numeric sd  .all    0.8280661280    0.83
## Sepal.Length numeric p0  .all    4.3000000000    4.3
## Sepal.Length numeric p25 .all    5.1000000000    5.1
## Sepal.Length numeric p50 .all    5.8000000000    5.8
## Sepal.Length numeric p75 .all    6.4000000000    6.4
## Sepal.Length numeric p100    .all    7.9000000000    7.9
## Sepal.Length numeric hist    .all    NA  ▂▇▅▇▆▅▂▂
## Sepal.Width  numeric missing .all    0.0000000000    0
## more rows...

How can I get the output as described in the vignette?

Elin
  • 6,507
  • 3
  • 25
  • 47
Rez99
  • 359
  • 1
  • 4
  • 15
  • Can you please try skim(iris) %>% print.skim_df()? Also could you try skim_to_list(iris)? – Elin Feb 09 '19 at 13:01
  • For the 1st command, I received the following error: 'could not find function "print.skim_df" '. I got it to work with a slight modification of your code: skim(iris) %>% print(skim_df()). Also, your 2nd suggestion "skim_to_list(iris)" worked well. Thank you. – Rez99 Mar 05 '19 at 02:20
  • Okay ... is it possible you are on R 3.4? There was another issue with a different function not being found on that version. We did a release recently to address that one. – Elin Mar 06 '19 at 03:05
  • Hi, we have just merged a fix for this in the version 2 branch of the skimr repository. Great if you would try it out. https://github.com/ropensci/skimr – Elin Apr 08 '19 at 12:03

0 Answers0