Skip to main content

2.9) Visualising R Objects


Here are some examples to help you understand how different kinds of objects look when printed on the screen.

A short character vector:
[1] "D" "A" "F" "A"

A simple list: several elements (in this case four), which can be of different types and lengths:
$Species
[1] "Acacia karoo"
$Sites
[1] 1 2 3 4 5 6
$Girth
[1] 0.8 2.5 1.9 1.4 2.1 3.8
$Fruitsize
[1] 14 12 18 50 43 40 58 79 66 50 12 35 9
[14] 47 56 32 58 20 58 46 25 34 42 51 20 35

Note that each of those four elements is a vector. The last vector is simply split across two rows on the screen.