Debian Codegraph @

tests/testthat/_snaps/dplyr.md

raw symbols SCIP
1 # dplyr::filter works as expected
2
3 Code
4 dplyr::filter(skimmed_iris, skim_type == "numeric")
5 Output
6 -- Data Summary ------------------------
7 Values
8 Name iris
9 Number of rows 150
10 Number of columns 5
11 _______________________
12 Column type frequency:
13 numeric 4
14 ________________________
15 Group variables None
16
17 -- Variable type: numeric ------------------------------------------------------
18 skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
19 1 Sepal.Length 0 1 5.84 0.828 4.3 5.1 5.8 6.4 7.9 ▆▇▇▅▂
20 2 Sepal.Width 0 1 3.06 0.436 2 2.8 3 3.3 4.4 ▁▆▇▂▁
21 3 Petal.Length 0 1 3.76 1.77 1 1.6 4.35 5.1 6.9 ▇▁▆▇▂
22 4 Petal.Width 0 1 1.20 0.762 0.1 0.3 1.3 1.8 2.5 ▇▁▇▅▃
23 Code
24 dplyr::filter(skimmed_iris, skim_type == "no_type")
25 Output
26 # A tibble: 0 x 15
27 # i 15 variables: skim_type <chr>, skim_variable <chr>, n_missing <int>,
28 # complete_rate <dbl>, factor.ordered <lgl>, factor.n_unique <int>,
29 # factor.top_counts <chr>, numeric.mean <dbl>, numeric.sd <dbl>,
30 # numeric.p0 <dbl>, numeric.p25 <dbl>, numeric.p50 <dbl>, numeric.p75 <dbl>,
31 # numeric.p100 <dbl>, numeric.hist <chr>
32
33 # dplyr::select works as expected
34
35 Code
36 with_type
37 Output
38 # A tibble: 5 x 2
39 skim_type skim_variable
40 <chr> <chr>
41 1 factor Species
42 2 numeric Sepal.Length
43 3 numeric Sepal.Width
44 4 numeric Petal.Length
45 5 numeric Petal.Width
46
47 ---
48
49 Code
50 without_type
51 Output
52 # A tibble: 5 x 1
53 numeric.mean
54 <dbl>
55 1 NA
56 2 5.84
57 3 3.06
58 4 3.76
59 5 1.20
60
61 # dplyr::mutate works as expected
62
63 Code
64 input
65 Output
66 -- Data Summary ------------------------
67 Values
68 Name iris
69 Number of rows 150
70 Number of columns 5
71 _______________________
72 Column type frequency:
73 factor 1
74 numeric 4
75 ________________________
76 Group variables None
77
78 -- Variable type: factor -------------------------------------------------------
79 skim_variable n_missing complete_rate ordered n_unique
80 1 Species 0 1 FALSE 3
81 top_counts
82 1 set: 50, ver: 50, vir: 50
83
84 -- Variable type: numeric ------------------------------------------------------
85 skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
86 1 Sepal.Length 0 1 5.84 0.828 4.3 5.1 5.8 6.4 7.9 ▆▇▇▅▂
87 2 Sepal.Width 0 1 3.06 0.436 2 2.8 3 3.3 4.4 ▁▆▇▂▁
88 3 Petal.Length 0 1 3.76 1.77 1 1.6 4.35 5.1 6.9 ▇▁▆▇▂
89 4 Petal.Width 0 1 1.20 0.762 0.1 0.3 1.3 1.8 2.5 ▇▁▇▅▃
90 mean2
91 1 34.1
92 2 9.35
93 3 14.1
94 4 1.44
95
96 # dplyr::slice works as expected
97
98 Code
99 input
100 Output
101 -- Data Summary ------------------------
102 Values
103 Name iris
104 Number of rows 150
105 Number of columns 5
106 _______________________
107 Column type frequency:
108 factor 1
109 numeric 2
110 ________________________
111 Group variables None
112
113 -- Variable type: factor -------------------------------------------------------
114 skim_variable n_missing complete_rate ordered n_unique
115 1 Species 0 1 FALSE 3
116 top_counts
117 1 set: 50, ver: 50, vir: 50
118
119 -- Variable type: numeric ------------------------------------------------------
120 skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
121 1 Sepal.Length 0 1 5.84 0.828 4.3 5.1 5.8 6.4 7.9 ▆▇▇▅▂
122 2 Sepal.Width 0 1 3.06 0.436 2 2.8 3 3.3 4.4 ▁▆▇▂▁
123
124 # dplyr::arrange works as expected
125
126 Code
127 dplyr::arrange(skimmed_iris, desc(numeric.mean))
128 Output
129 -- Data Summary ------------------------
130 Values
131 Name iris
132 Number of rows 150
133 Number of columns 5
134 _______________________
135 Column type frequency:
136 factor 1
137 numeric 4
138 ________________________
139 Group variables None
140
141 -- Variable type: factor -------------------------------------------------------
142 skim_variable n_missing complete_rate ordered n_unique
143 1 Species 0 1 FALSE 3
144 top_counts
145 1 set: 50, ver: 50, vir: 50
146
147 -- Variable type: numeric ------------------------------------------------------
148 skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
149 1 Sepal.Length 0 1 5.84 0.828 4.3 5.1 5.8 6.4 7.9 ▆▇▇▅▂
150 2 Petal.Length 0 1 3.76 1.77 1 1.6 4.35 5.1 6.9 ▇▁▆▇▂
151 3 Sepal.Width 0 1 3.06 0.436 2 2.8 3 3.3 4.4 ▁▆▇▂▁
152 4 Petal.Width 0 1 1.20 0.762 0.1 0.3 1.3 1.8 2.5 ▇▁▇▅▃
153