3.3 Displaying tibbles
The way it prints in the console is different than that of data frames:
- Dimensions are shown.
- Information about columns data types (no need for
mode()
ortypeof
). - Only the first 10 rows are displayed.
- Only the columns that fit the screen are displayed.
If you want to see more rows, set the n
parameter in print()
:
- Print the first 15 rows:
print(mytibble, n=15)
## # A tibble: 26 x 2
## letters numbers
## <chr> <int>
## 1 A 1
## 2 B 2
## 3 C 3
## 4 D 4
## 5 E 5
## 6 F 6
## 7 G 7
## 8 H 8
## 9 I 9
## 10 J 10
## 11 K 11
## 12 L 12
## 13 M 13
## 14 N 14
## 15 O 15
## # … with 11 more rows
- Print all rows:
print(mytibble, n=Inf)
## # A tibble: 26 x 2
## letters numbers
## <chr> <int>
## 1 A 1
## 2 B 2
## 3 C 3
## 4 D 4
## 5 E 5
## 6 F 6
## 7 G 7
## 8 H 8
## 9 I 9
## 10 J 10
## 11 K 11
## 12 L 12
## 13 M 13
## 14 N 14
## 15 O 15
## 16 P 16
## 17 Q 17
## 18 R 18
## 19 S 19
## 20 T 20
## 21 U 21
## 22 V 22
## 23 W 23
## 24 X 24
## 25 Y 25
## 26 Z 26