Debian Codegraph @

tests/testthat/_snaps/unicode/ctl_colonnade.md

raw symbols SCIP
1 # color
2
3 Code
4 style_na("NA")
5 Output
6 [1] "\033[31mNA\033[39m"
7 Code
8 style_neg("-1")
9 Output
10 [1] "\033[31m-1\033[39m"
11
12 ---
13
14 Code
15 xf <- (function() ctl_colonnade(list(x = c((10^(-3:4)) * c(-1, 1), NA))))
16 print(xf())
17 Output
18 $body
19 x
20 <dbl>
21 1 -0.001
22 2 0.01
23 3 -0.1
24 4 1
25 5 -10
26 6 100
27 7 -1000
28 8 10000
29 9 NA
30
31 $extra_cols
32 list()
33
34 $abbrev_cols
35 character(0)
36
37 $abbrev_col_idxs
38 numeric(0)
39
40 Code
41 with_options(pillar.subtle_num = TRUE, print(xf()))
42 Output
43 $body
44 x
45 <dbl>
46 1 -0.001
47 2 0.01
48 3 -0.1
49 4 1
50 5 -10
51 6 100
52 7 -1000
53 8 10000
54 9 NA
55
56 $extra_cols
57 list()
58
59 $abbrev_cols
60 character(0)
61
62 $abbrev_col_idxs
63 numeric(0)
64
65 Code
66 with_options(pillar.subtle = FALSE, print(xf()))
67 Output
68 $body
69 x
70 <dbl>
71 1 -0.001
72 2 0.01
73 3 -0.1
74 4 1
75 5 -10
76 6 100
77 7 -1000
78 8 10000
79 9 NA
80
81 $extra_cols
82 list()
83
84 $abbrev_cols
85 character(0)
86
87 $abbrev_col_idxs
88 numeric(0)
89
90 Code
91 with_options(pillar.neg = FALSE, print(xf()))
92 Output
93 $body
94 x
95 <dbl>
96 1 -0.001
97 2 0.01
98 3 -0.1
99 4 1
100 5 -10
101 6 100
102 7 -1000
103 8 10000
104 9 NA
105
106 $extra_cols
107 list()
108
109 $abbrev_cols
110 character(0)
111
112 $abbrev_col_idxs
113 numeric(0)
114
115 Code
116 with_options(pillar.subtle = FALSE, pillar.neg = FALSE, print(xf()))
117 Output
118 $body
119 x
120 <dbl>
121 1 -0.001
122 2 0.01
123 3 -0.1
124 4 1
125 5 -10
126 6 100
127 7 -1000
128 8 10000
129 9 NA
130
131 $extra_cols
132 list()
133
134 $abbrev_cols
135 character(0)
136
137 $abbrev_col_idxs
138 numeric(0)
139
140 Code
141 with_options(pillar.bold = TRUE, print(xf()))
142 Output
143 $body
144 x
145 <dbl>
146 1 -0.001
147 2 0.01
148 3 -0.1
149 4 1
150 5 -10
151 6 100
152 7 -1000
153 8 10000
154 9 NA
155
156 $extra_cols
157 list()
158
159 $abbrev_cols
160 character(0)
161
162 $abbrev_col_idxs
163 numeric(0)
164
165
166 ---
167
168 Code
169 ctl_colonnade(list(a_very_long_column_name = 0), width = 20)
170 Output
171 $body
172
173 $extra_cols
174 $extra_cols$a_very_long_column_name
175 [1] 0
176
177
178 $abbrev_cols
179 character(0)
180
181 $abbrev_col_idxs
182 numeric(0)
183
184
185 # focus columns
186
187 Code
188 tbl_format_setup(x, width = 30, focus = "b")
189 Output
190 <pillar_tbl_format_setup>
191 <tbl_format_header(setup)>
192 # A data frame: 1 × 2
193 <tbl_format_body(setup)>
194 a$x $y b
195 <dbl> <dbl> <chr>
196 1 1 2 long enough
197 <tbl_format_footer(setup)>
198 Code
199 tbl_format_setup(x, width = 20, focus = "b")
200 Output
201 <pillar_tbl_format_setup>
202 <tbl_format_header(setup)>
203 # A data frame: 1 ×
204 # 2
205 <tbl_format_body(setup)>
206 a$x b
207 <dbl> <chr>
208 1 1 long enough
209 <tbl_format_footer(setup)>
210 # ℹ 1 more
211 # variable:
212 # a$y <dbl>
213 Code
214 tbl_format_setup(x, width = 15, focus = "b")
215 Output
216 <pillar_tbl_format_setup>
217 <tbl_format_header(setup)>
218 # A data
219 # frame: 1 ×
220 # 2
221 <tbl_format_body(setup)>
222 b
223 <chr>
224 1 long enough
225 <tbl_format_footer(setup)>
226 # ℹ 1 more
227 # variable:
228 # a <tbl[,2]>
229 Code
230 tbl_format_setup(x, width = 10, focus = "b")
231 Output
232 <pillar_tbl_format_setup>
233 <tbl_format_header(setup)>
234 # A data
235 # frame:
236 # 1 × 2
237 <tbl_format_body(setup)>
238 b
239 <chr>
240 1 long en…
241 <tbl_format_footer(setup)>
242 # ℹ 1
243 # more
244 # variable:
245 # a <tbl[,2]>
246 Code
247 tbl_format_setup(x[2:1], width = 30, focus = "a")
248 Output
249 <pillar_tbl_format_setup>
250 <tbl_format_header(setup)>
251 # A data frame: 1 × 2
252 <tbl_format_body(setup)>
253 b a$x $y
254 <chr> <dbl> <dbl>
255 1 long enough 1 2
256 <tbl_format_footer(setup)>
257 Code
258 tbl_format_setup(x[2:1], width = 20, focus = "a")
259 Output
260 <pillar_tbl_format_setup>
261 <tbl_format_header(setup)>
262 # A data frame: 1 ×
263 # 2
264 <tbl_format_body(setup)>
265 b a$x $y
266 <chr> <dbl> <dbl>
267 1 long … 1 2
268 <tbl_format_footer(setup)>
269 Code
270 tbl_format_setup(x[2:1], width = 15, focus = "a")
271 Output
272 <pillar_tbl_format_setup>
273 <tbl_format_header(setup)>
274 # A data
275 # frame: 1 ×
276 # 2
277 <tbl_format_body(setup)>
278 a$x $y
279 <dbl> <dbl>
280 1 1 2
281 <tbl_format_footer(setup)>
282 # ℹ 1 more
283 # variable:
284 # b <chr>
285 Code
286 tbl_format_setup(x[2:1], width = 10, focus = "a")
287 Output
288 <pillar_tbl_format_setup>
289 <tbl_format_header(setup)>
290 # A data
291 # frame:
292 # 1 × 2
293 <tbl_format_body(setup)>
294 a$x
295 <dbl>
296 1 1
297 <tbl_format_footer(setup)>
298 # ℹ 2
299 # more
300 # variables:
301 # a$y <dbl>,
302 # b <chr>
303 Code
304 tbl_format_setup(x, width = 30, focus = c("a", "b"))
305 Output
306 <pillar_tbl_format_setup>
307 <tbl_format_header(setup)>
308 # A data frame: 1 × 2
309 <tbl_format_body(setup)>
310 a$x $y b
311 <dbl> <dbl> <chr>
312 1 1 2 long enough
313 <tbl_format_footer(setup)>
314 Code
315 tbl_format_setup(x, width = 20, focus = c("a", "b"))
316 Output
317 <pillar_tbl_format_setup>
318 <tbl_format_header(setup)>
319 # A data frame: 1 ×
320 # 2
321 <tbl_format_body(setup)>
322 a$x $y b
323 <dbl> <dbl> <chr>
324 1 1 2 long …
325 <tbl_format_footer(setup)>
326 Code
327 tbl_format_setup(x, width = 15, focus = c("a", "b"))
328 Output
329 <pillar_tbl_format_setup>
330 <tbl_format_header(setup)>
331 # A data
332 # frame: 1 ×
333 # 2
334 <tbl_format_body(setup)>
335 a$x b
336 <dbl> <chr>
337 1 1 long e…
338 <tbl_format_footer(setup)>
339 # ℹ 1 more
340 # variable:
341 # a$y <dbl>
342 Code
343 tbl_format_setup(x, width = 10, focus = c("a", "b"))
344 Output
345 <pillar_tbl_format_setup>
346 <tbl_format_header(setup)>
347 # A data
348 # frame:
349 # 1 × 2
350 <tbl_format_body(setup)>
351 a$x
352 <dbl>
353 1 1
354 <tbl_format_footer(setup)>
355 # ℹ 2
356 # more
357 # variables:
358 # a$y <dbl>,
359 # b <chr>
360 Code
361 tbl_format_setup(x[2:1], width = 30, focus = c("a", "b"))
362 Output
363 <pillar_tbl_format_setup>
364 <tbl_format_header(setup)>
365 # A data frame: 1 × 2
366 <tbl_format_body(setup)>
367 b a$x $y
368 <chr> <dbl> <dbl>
369 1 long enough 1 2
370 <tbl_format_footer(setup)>
371 Code
372 tbl_format_setup(x[2:1], width = 20, focus = c("a", "b"))
373 Output
374 <pillar_tbl_format_setup>
375 <tbl_format_header(setup)>
376 # A data frame: 1 ×
377 # 2
378 <tbl_format_body(setup)>
379 b a$x
380 <chr> <dbl>
381 1 long enough 1
382 <tbl_format_footer(setup)>
383 # ℹ 1 more
384 # variable:
385 # a$y <dbl>
386 Code
387 tbl_format_setup(x[2:1], width = 15, focus = c("a", "b"))
388 Output
389 <pillar_tbl_format_setup>
390 <tbl_format_header(setup)>
391 # A data
392 # frame: 1 ×
393 # 2
394 <tbl_format_body(setup)>
395 b a$x
396 <chr> <dbl>
397 1 long e… 1
398 <tbl_format_footer(setup)>
399 # ℹ 1 more
400 # variable:
401 # a$y <dbl>
402 Code
403 tbl_format_setup(x[2:1], width = 10, focus = c("a", "b"))
404 Output
405 <pillar_tbl_format_setup>
406 <tbl_format_header(setup)>
407 # A data
408 # frame:
409 # 1 × 2
410 <tbl_format_body(setup)>
411 b
412 <chr>
413 1 long en…
414 <tbl_format_footer(setup)>
415 # ℹ 1
416 # more
417 # variable:
418 # a <tbl[,2]>
419