Debian Codegraph @

tests/testthat/_snaps/skim_tee.md

raw symbols SCIP
1 # Using skim_tee prints returns the object
2
3 Code
4 skim_object <- skim_tee(chickwts)
5 Output
6 -- Data Summary ------------------------
7 Values
8 Name data
9 Number of rows 71
10 Number of columns 2
11 _______________________
12 Column type frequency:
13 factor 1
14 numeric 1
15 ________________________
16 Group variables None
17
18 -- Variable type: factor -------------------------------------------------------
19 skim_variable n_missing complete_rate ordered n_unique
20 1 feed 0 1 FALSE 6
21 top_counts
22 1 soy: 14, cas: 12, lin: 12, sun: 12
23
24 -- Variable type: numeric ------------------------------------------------------
25 skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
26 1 weight 0 1 261. 78.1 108 204. 258 324. 423 ▆▆▇▇▃
27
28 # skim_tee prints only selected columns, but returns full object
29
30 Code
31 obj <- skim_tee(iris, Species)
32 Output
33 -- Data Summary ------------------------
34 Values
35 Name data
36 Number of rows 150
37 Number of columns 5
38 _______________________
39 Column type frequency:
40 factor 1
41 ________________________
42 Group variables None
43
44 -- Variable type: factor -------------------------------------------------------
45 skim_variable n_missing complete_rate ordered n_unique
46 1 Species 0 1 FALSE 3
47 top_counts
48 1 set: 50, ver: 50, vir: 50
49
50 # skim_tee supports dplyr helpers
51
52 Code
53 obj <- skim_tee(iris, starts_with("Sepal"))
54 Output
55 -- Data Summary ------------------------
56 Values
57 Name data
58 Number of rows 150
59 Number of columns 5
60 _______________________
61 Column type frequency:
62 numeric 2
63 ________________________
64 Group variables None
65
66 -- Variable type: numeric ------------------------------------------------------
67 skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
68 1 Sepal.Length 0 1 5.84 0.828 4.3 5.1 5.8 6.4 7.9 ▆▇▇▅▂
69 2 Sepal.Width 0 1 3.06 0.436 2 2.8 3 3.3 4.4 ▁▆▇▂▁
70
71 # Skim_tee works with groups
72
73 Code
74 obj <- skim_tee(iris_grouped, Sepal.Length, skim_fun = my_skim)
75 Output
76 -- Data Summary ------------------------
77 Values
78 Name data
79 Number of rows 150
80 Number of columns 5
81 _______________________
82 Column type frequency:
83 numeric 1
84 ________________________
85 Group variables Species
86
87 -- Variable type: numeric ------------------------------------------------------
88 skim_variable Species n_missing complete_rate mean sd p0 p25 p50 p75
89 1 Sepal.Length setosa 0 1 5.01 0.352 4.3 4.8 5 5.2
90 2 Sepal.Length versicolor 0 1 5.94 0.516 4.9 5.6 5.9 6.3
91 3 Sepal.Length virginica 0 1 6.59 0.636 4.9 6.22 6.5 6.9
92 p100
93 1 5.8
94 2 7
95 3 7.9
96