list
?tibble::data_frame
library(tidyverse) # don't worry about the output from this just yet
## ── Attaching packages ────────────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 2.2.1 ✔ purrr 0.2.4
## ✔ tibble 1.3.4 ✔ dplyr 0.7.4
## ✔ tidyr 0.7.2 ✔ stringr 1.2.0
## ✔ readr 1.1.1 ✔ forcats 0.2.0
## ── Conflicts ───────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
starwars # this is a built-in data set from the "tidyverse"
## # A tibble: 87 x 13
## name height mass hair_color skin_color eye_color
## <chr> <int> <dbl> <chr> <chr> <chr>
## 1 Luke Skywalker 172 77 blond fair blue
## 2 C-3PO 167 75 <NA> gold yellow
## 3 R2-D2 96 32 <NA> white, blue red
## 4 Darth Vader 202 136 none white yellow
## 5 Leia Organa 150 49 brown light brown
## 6 Owen Lars 178 120 brown, grey light blue
## 7 Beru Whitesun lars 165 75 brown light blue
## 8 R5-D4 97 32 <NA> white, red red
## 9 Biggs Darklighter 183 84 black light brown
## 10 Obi-Wan Kenobi 182 77 auburn, white fair blue-gray
## # ... with 77 more rows, and 7 more variables: birth_year <dbl>,
## # gender <chr>, homeworld <chr>, species <chr>, films <list>,
## # vehicles <list>, starships <list>
class(starwars)
## [1] "tbl_df" "tbl" "data.frame"
typeof(starwars)
## [1] "list"
mode(starwars)
## [1] "list"
dim(starwars)
## [1] 87 13
data.frame(starwars)
## name height mass hair_color skin_color
## 1 Luke Skywalker 172 77.0 blond fair
## 2 C-3PO 167 75.0 <NA> gold
## 3 R2-D2 96 32.0 <NA> white, blue
## 4 Darth Vader 202 136.0 none white
## 5 Leia Organa 150 49.0 brown light
## 6 Owen Lars 178 120.0 brown, grey light
## 7 Beru Whitesun lars 165 75.0 brown light
## 8 R5-D4 97 32.0 <NA> white, red
## 9 Biggs Darklighter 183 84.0 black light
## 10 Obi-Wan Kenobi 182 77.0 auburn, white fair
## 11 Anakin Skywalker 188 84.0 blond fair
## 12 Wilhuff Tarkin 180 NA auburn, grey fair
## 13 Chewbacca 228 112.0 brown unknown
## 14 Han Solo 180 80.0 brown fair
## 15 Greedo 173 74.0 <NA> green
## 16 Jabba Desilijic Tiure 175 1358.0 <NA> green-tan, brown
## 17 Wedge Antilles 170 77.0 brown fair
## 18 Jek Tono Porkins 180 110.0 brown fair
## 19 Yoda 66 17.0 white green
## 20 Palpatine 170 75.0 grey pale
## 21 Boba Fett 183 78.2 black fair
## 22 IG-88 200 140.0 none metal
## 23 Bossk 190 113.0 none green
## 24 Lando Calrissian 177 79.0 black dark
## 25 Lobot 175 79.0 none light
## 26 Ackbar 180 83.0 none brown mottle
## 27 Mon Mothma 150 NA auburn fair
## 28 Arvel Crynyd NA NA brown fair
## 29 Wicket Systri Warrick 88 20.0 brown brown
## 30 Nien Nunb 160 68.0 none grey
## 31 Qui-Gon Jinn 193 89.0 brown fair
## 32 Nute Gunray 191 90.0 none mottled green
## 33 Finis Valorum 170 NA blond fair
## 34 Jar Jar Binks 196 66.0 none orange
## 35 Roos Tarpals 224 82.0 none grey
## 36 Rugor Nass 206 NA none green
## 37 Ric Olié 183 NA brown fair
## 38 Watto 137 NA black blue, grey
## 39 Sebulba 112 40.0 none grey, red
## 40 Quarsh Panaka 183 NA black dark
## 41 Shmi Skywalker 163 NA black fair
## 42 Darth Maul 175 80.0 none red
## 43 Bib Fortuna 180 NA none pale
## 44 Ayla Secura 178 55.0 none blue
## 45 Dud Bolt 94 45.0 none blue, grey
## 46 Gasgano 122 NA none white, blue
## 47 Ben Quadinaros 163 65.0 none grey, green, yellow
## 48 Mace Windu 188 84.0 none dark
## 49 Ki-Adi-Mundi 198 82.0 white pale
## 50 Kit Fisto 196 87.0 none green
## 51 Eeth Koth 171 NA black brown
## 52 Adi Gallia 184 50.0 none dark
## 53 Saesee Tiin 188 NA none pale
## 54 Yarael Poof 264 NA none white
## 55 Plo Koon 188 80.0 none orange
## 56 Mas Amedda 196 NA none blue
## 57 Gregar Typho 185 85.0 black dark
## 58 Cordé 157 NA brown light
## 59 Cliegg Lars 183 NA brown fair
## 60 Poggle the Lesser 183 80.0 none green
## 61 Luminara Unduli 170 56.2 black yellow
## 62 Barriss Offee 166 50.0 black yellow
## 63 Dormé 165 NA brown light
## 64 Dooku 193 80.0 white fair
## 65 Bail Prestor Organa 191 NA black tan
## 66 Jango Fett 183 79.0 black tan
## 67 Zam Wesell 168 55.0 blonde fair, green, yellow
## 68 Dexter Jettster 198 102.0 none brown
## 69 Lama Su 229 88.0 none grey
## 70 Taun We 213 NA none grey
## 71 Jocasta Nu 167 NA white fair
## 72 Ratts Tyerell 79 15.0 none grey, blue
## 73 R4-P17 96 NA none silver, red
## 74 Wat Tambor 193 48.0 none green, grey
## 75 San Hill 191 NA none grey
## 76 Shaak Ti 178 57.0 none red, blue, white
## 77 Grievous 216 159.0 none brown, white
## 78 Tarfful 234 136.0 brown brown
## 79 Raymus Antilles 188 79.0 brown light
## 80 Sly Moore 178 48.0 none pale
## 81 Tion Medon 206 80.0 none grey
## 82 Finn NA NA black dark
## 83 Rey NA NA brown light
## 84 Poe Dameron NA NA brown light
## 85 BB8 NA NA none none
## 86 Captain Phasma NA NA unknown unknown
## 87 Padmé Amidala 165 45.0 brown light
## eye_color birth_year gender homeworld species
## 1 blue 19.0 male Tatooine Human
## 2 yellow 112.0 <NA> Tatooine Droid
## 3 red 33.0 <NA> Naboo Droid
## 4 yellow 41.9 male Tatooine Human
## 5 brown 19.0 female Alderaan Human
## 6 blue 52.0 male Tatooine Human
## 7 blue 47.0 female Tatooine Human
## 8 red NA <NA> Tatooine Droid
## 9 brown 24.0 male Tatooine Human
## 10 blue-gray 57.0 male Stewjon Human
## 11 blue 41.9 male Tatooine Human
## 12 blue 64.0 male Eriadu Human
## 13 blue 200.0 male Kashyyyk Wookiee
## 14 brown 29.0 male Corellia Human
## 15 black 44.0 male Rodia Rodian
## 16 orange 600.0 hermaphrodite Nal Hutta Hutt
## 17 hazel 21.0 male Corellia Human
## 18 blue NA male Bestine IV Human
## 19 brown 896.0 male <NA> Yoda's species
## 20 yellow 82.0 male Naboo Human
## 21 brown 31.5 male Kamino Human
## 22 red 15.0 none <NA> Droid
## 23 red 53.0 male Trandosha Trandoshan
## 24 brown 31.0 male Socorro Human
## 25 blue 37.0 male Bespin Human
## 26 orange 41.0 male Mon Cala Mon Calamari
## 27 blue 48.0 female Chandrila Human
## 28 brown NA male <NA> Human
## 29 brown 8.0 male Endor Ewok
## 30 black NA male Sullust Sullustan
## 31 blue 92.0 male <NA> Human
## 32 red NA male Cato Neimoidia Neimodian
## 33 blue 91.0 male Coruscant Human
## 34 orange 52.0 male Naboo Gungan
## 35 orange NA male Naboo Gungan
## 36 orange NA male Naboo Gungan
## 37 blue NA male Naboo <NA>
## 38 yellow NA male Toydaria Toydarian
## 39 orange NA male Malastare Dug
## 40 brown 62.0 male Naboo <NA>
## 41 brown 72.0 female Tatooine Human
## 42 yellow 54.0 male Dathomir Zabrak
## 43 pink NA male Ryloth Twi'lek
## 44 hazel 48.0 female Ryloth Twi'lek
## 45 yellow NA male Vulpter Vulptereen
## 46 black NA male Troiken Xexto
## 47 orange NA male Tund Toong
## 48 brown 72.0 male Haruun Kal Human
## 49 yellow 92.0 male Cerea Cerean
## 50 black NA male Glee Anselm Nautolan
## 51 brown NA male Iridonia Zabrak
## 52 blue NA female Coruscant Tholothian
## 53 orange NA male Iktotch Iktotchi
## 54 yellow NA male Quermia Quermian
## 55 black 22.0 male Dorin Kel Dor
## 56 blue NA male Champala Chagrian
## 57 brown NA male Naboo Human
## 58 brown NA female Naboo Human
## 59 blue 82.0 male Tatooine Human
## 60 yellow NA male Geonosis Geonosian
## 61 blue 58.0 female Mirial Mirialan
## 62 blue 40.0 female Mirial Mirialan
## 63 brown NA female Naboo Human
## 64 brown 102.0 male Serenno Human
## 65 brown 67.0 male Alderaan Human
## 66 brown 66.0 male Concord Dawn Human
## 67 yellow NA female Zolan Clawdite
## 68 yellow NA male Ojom Besalisk
## 69 black NA male Kamino Kaminoan
## 70 black NA female Kamino Kaminoan
## 71 blue NA female Coruscant Human
## 72 unknown NA male Aleen Minor Aleena
## 73 red, blue NA female <NA> <NA>
## 74 unknown NA male Skako Skakoan
## 75 gold NA male Muunilinst Muun
## 76 black NA female Shili Togruta
## 77 green, yellow NA male Kalee Kaleesh
## 78 blue NA male Kashyyyk Wookiee
## 79 brown NA male Alderaan Human
## 80 white NA female Umbara <NA>
## 81 black NA male Utapau Pau'an
## 82 dark NA male <NA> Human
## 83 hazel NA female <NA> Human
## 84 brown NA male <NA> Human
## 85 black NA none <NA> Droid
## 86 unknown NA female <NA> <NA>
## 87 brown 46.0 female Naboo Human
## films
## 1 Revenge of the Sith, Return of the Jedi, The Empire Strikes Back, A New Hope, The Force Awakens
## 2 Attack of the Clones, The Phantom Menace, Revenge of the Sith, Return of the Jedi, The Empire Strikes Back, A New Hope
## 3 Attack of the Clones, The Phantom Menace, Revenge of the Sith, Return of the Jedi, The Empire Strikes Back, A New Hope, The Force Awakens
## 4 Revenge of the Sith, Return of the Jedi, The Empire Strikes Back, A New Hope
## 5 Revenge of the Sith, Return of the Jedi, The Empire Strikes Back, A New Hope, The Force Awakens
## 6 Attack of the Clones, Revenge of the Sith, A New Hope
## 7 Attack of the Clones, Revenge of the Sith, A New Hope
## 8 A New Hope
## 9 A New Hope
## 10 Attack of the Clones, The Phantom Menace, Revenge of the Sith, Return of the Jedi, The Empire Strikes Back, A New Hope
## 11 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## 12 Revenge of the Sith, A New Hope
## 13 Revenge of the Sith, Return of the Jedi, The Empire Strikes Back, A New Hope, The Force Awakens
## 14 Return of the Jedi, The Empire Strikes Back, A New Hope, The Force Awakens
## 15 A New Hope
## 16 The Phantom Menace, Return of the Jedi, A New Hope
## 17 Return of the Jedi, The Empire Strikes Back, A New Hope
## 18 A New Hope
## 19 Attack of the Clones, The Phantom Menace, Revenge of the Sith, Return of the Jedi, The Empire Strikes Back
## 20 Attack of the Clones, The Phantom Menace, Revenge of the Sith, Return of the Jedi, The Empire Strikes Back
## 21 Attack of the Clones, Return of the Jedi, The Empire Strikes Back
## 22 The Empire Strikes Back
## 23 The Empire Strikes Back
## 24 Return of the Jedi, The Empire Strikes Back
## 25 The Empire Strikes Back
## 26 Return of the Jedi, The Force Awakens
## 27 Return of the Jedi
## 28 Return of the Jedi
## 29 Return of the Jedi
## 30 Return of the Jedi
## 31 The Phantom Menace
## 32 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## 33 The Phantom Menace
## 34 Attack of the Clones, The Phantom Menace
## 35 The Phantom Menace
## 36 The Phantom Menace
## 37 The Phantom Menace
## 38 Attack of the Clones, The Phantom Menace
## 39 The Phantom Menace
## 40 The Phantom Menace
## 41 Attack of the Clones, The Phantom Menace
## 42 The Phantom Menace
## 43 Return of the Jedi
## 44 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## 45 The Phantom Menace
## 46 The Phantom Menace
## 47 The Phantom Menace
## 48 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## 49 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## 50 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## 51 The Phantom Menace, Revenge of the Sith
## 52 The Phantom Menace, Revenge of the Sith
## 53 The Phantom Menace, Revenge of the Sith
## 54 The Phantom Menace
## 55 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## 56 Attack of the Clones, The Phantom Menace
## 57 Attack of the Clones
## 58 Attack of the Clones
## 59 Attack of the Clones
## 60 Attack of the Clones, Revenge of the Sith
## 61 Attack of the Clones, Revenge of the Sith
## 62 Attack of the Clones
## 63 Attack of the Clones
## 64 Attack of the Clones, Revenge of the Sith
## 65 Attack of the Clones, Revenge of the Sith
## 66 Attack of the Clones
## 67 Attack of the Clones
## 68 Attack of the Clones
## 69 Attack of the Clones
## 70 Attack of the Clones
## 71 Attack of the Clones
## 72 The Phantom Menace
## 73 Attack of the Clones, Revenge of the Sith
## 74 Attack of the Clones
## 75 Attack of the Clones
## 76 Attack of the Clones, Revenge of the Sith
## 77 Revenge of the Sith
## 78 Revenge of the Sith
## 79 Revenge of the Sith, A New Hope
## 80 Attack of the Clones, Revenge of the Sith
## 81 Revenge of the Sith
## 82 The Force Awakens
## 83 The Force Awakens
## 84 The Force Awakens
## 85 The Force Awakens
## 86 The Force Awakens
## 87 Attack of the Clones, The Phantom Menace, Revenge of the Sith
## vehicles
## 1 Snowspeeder, Imperial Speeder Bike
## 2
## 3
## 4
## 5 Imperial Speeder Bike
## 6
## 7
## 8
## 9
## 10 Tribubble bongo
## 11 Zephyr-G swoop bike, XJ-6 airspeeder
## 12
## 13 AT-ST
## 14
## 15
## 16
## 17 Snowspeeder
## 18
## 19
## 20
## 21
## 22
## 23
## 24
## 25
## 26
## 27
## 28
## 29
## 30
## 31 Tribubble bongo
## 32
## 33
## 34
## 35
## 36
## 37
## 38
## 39
## 40
## 41
## 42 Sith speeder
## 43
## 44
## 45
## 46
## 47
## 48
## 49
## 50
## 51
## 52
## 53
## 54
## 55
## 56
## 57
## 58
## 59
## 60
## 61
## 62
## 63
## 64 Flitknot speeder
## 65
## 66
## 67 Koro-2 Exodrive airspeeder
## 68
## 69
## 70
## 71
## 72
## 73
## 74
## 75
## 76
## 77 Tsmeu-6 personal wheel bike
## 78
## 79
## 80
## 81
## 82
## 83
## 84
## 85
## 86
## 87
## starships
## 1 X-wing, Imperial shuttle
## 2
## 3
## 4 TIE Advanced x1
## 5
## 6
## 7
## 8
## 9 X-wing
## 10 Jedi starfighter, Trade Federation cruiser, Naboo star skiff, Jedi Interceptor, Belbullab-22 starfighter
## 11 Trade Federation cruiser, Jedi Interceptor, Naboo fighter
## 12
## 13 Millennium Falcon, Imperial shuttle
## 14 Millennium Falcon, Imperial shuttle
## 15
## 16
## 17 X-wing
## 18 X-wing
## 19
## 20
## 21 Slave 1
## 22
## 23
## 24 Millennium Falcon
## 25
## 26
## 27
## 28 A-wing
## 29
## 30 Millennium Falcon
## 31
## 32
## 33
## 34
## 35
## 36
## 37 Naboo Royal Starship
## 38
## 39
## 40
## 41
## 42 Scimitar
## 43
## 44
## 45
## 46
## 47
## 48
## 49
## 50
## 51
## 52
## 53
## 54
## 55 Jedi starfighter
## 56
## 57 Naboo fighter
## 58
## 59
## 60
## 61
## 62
## 63
## 64
## 65
## 66
## 67
## 68
## 69
## 70
## 71
## 72
## 73
## 74
## 75
## 76
## 77 Belbullab-22 starfighter
## 78
## 79
## 80
## 81
## 82
## 83
## 84 T-70 X-wing fighter
## 85
## 86
## 87 H-type Nubian yacht, Naboo star skiff, Naboo fighter
str(starwars)
## Classes 'tbl_df', 'tbl' and 'data.frame': 87 obs. of 13 variables:
## $ name : chr "Luke Skywalker" "C-3PO" "R2-D2" "Darth Vader" ...
## $ height : int 172 167 96 202 150 178 165 97 183 182 ...
## $ mass : num 77 75 32 136 49 120 75 32 84 77 ...
## $ hair_color: chr "blond" NA NA "none" ...
## $ skin_color: chr "fair" "gold" "white, blue" "white" ...
## $ eye_color : chr "blue" "yellow" "red" "yellow" ...
## $ birth_year: num 19 112 33 41.9 19 52 47 NA 24 57 ...
## $ gender : chr "male" NA NA "male" ...
## $ homeworld : chr "Tatooine" "Tatooine" "Naboo" "Tatooine" ...
## $ species : chr "Human" "Droid" "Droid" "Human" ...
## $ films :List of 87
## ..$ : chr "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope" ...
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope"
## ..$ : chr "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope" ...
## ..$ : chr "Attack of the Clones" "Revenge of the Sith" "A New Hope"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith" "A New Hope"
## ..$ : chr "A New Hope"
## ..$ : chr "A New Hope"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith" "A New Hope"
## ..$ : chr "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope" ...
## ..$ : chr "Return of the Jedi" "The Empire Strikes Back" "A New Hope" "The Force Awakens"
## ..$ : chr "A New Hope"
## ..$ : chr "The Phantom Menace" "Return of the Jedi" "A New Hope"
## ..$ : chr "Return of the Jedi" "The Empire Strikes Back" "A New Hope"
## ..$ : chr "A New Hope"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr "Attack of the Clones" "Return of the Jedi" "The Empire Strikes Back"
## ..$ : chr "The Empire Strikes Back"
## ..$ : chr "The Empire Strikes Back"
## ..$ : chr "Return of the Jedi" "The Empire Strikes Back"
## ..$ : chr "The Empire Strikes Back"
## ..$ : chr "Return of the Jedi" "The Force Awakens"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith" "A New Hope"
## ..$ : chr "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## $ vehicles :List of 87
## ..$ : chr "Snowspeeder" "Imperial Speeder Bike"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Imperial Speeder Bike"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Tribubble bongo"
## ..$ : chr "Zephyr-G swoop bike" "XJ-6 airspeeder"
## ..$ : chr
## ..$ : chr "AT-ST"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Snowspeeder"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Tribubble bongo"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Sith speeder"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Flitknot speeder"
## ..$ : chr
## ..$ : chr
## ..$ : chr "Koro-2 Exodrive airspeeder"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Tsmeu-6 personal wheel bike"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## $ starships :List of 87
## ..$ : chr "X-wing" "Imperial shuttle"
## ..$ : chr
## ..$ : chr
## ..$ : chr "TIE Advanced x1"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "X-wing"
## ..$ : chr "Jedi starfighter" "Trade Federation cruiser" "Naboo star skiff" "Jedi Interceptor" ...
## ..$ : chr "Trade Federation cruiser" "Jedi Interceptor" "Naboo fighter"
## ..$ : chr
## ..$ : chr "Millennium Falcon" "Imperial shuttle"
## ..$ : chr "Millennium Falcon" "Imperial shuttle"
## ..$ : chr
## ..$ : chr
## ..$ : chr "X-wing"
## ..$ : chr "X-wing"
## ..$ : chr
## ..$ : chr
## ..$ : chr "Slave 1"
## ..$ : chr
## ..$ : chr
## ..$ : chr "Millennium Falcon"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "A-wing"
## ..$ : chr
## ..$ : chr "Millennium Falcon"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Naboo Royal Starship"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Scimitar"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Jedi starfighter"
## ..$ : chr
## ..$ : chr "Naboo fighter"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "Belbullab-22 starfighter"
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr
## ..$ : chr "T-70 X-wing fighter"
## ..$ : chr
## ..$ : chr
## ..$ : chr "H-type Nubian yacht" "Naboo star skiff" "Naboo fighter"
glimpse(starwars)
## Observations: 87
## Variables: 13
## $ name <chr> "Luke Skywalker", "C-3PO", "R2-D2", "Darth Vader", ...
## $ height <int> 172, 167, 96, 202, 150, 178, 165, 97, 183, 182, 188...
## $ mass <dbl> 77.0, 75.0, 32.0, 136.0, 49.0, 120.0, 75.0, 32.0, 8...
## $ hair_color <chr> "blond", NA, NA, "none", "brown", "brown, grey", "b...
## $ skin_color <chr> "fair", "gold", "white, blue", "white", "light", "l...
## $ eye_color <chr> "blue", "yellow", "red", "yellow", "brown", "blue",...
## $ birth_year <dbl> 19.0, 112.0, 33.0, 41.9, 19.0, 52.0, 47.0, NA, 24.0...
## $ gender <chr> "male", NA, NA, "male", "female", "male", "female",...
## $ homeworld <chr> "Tatooine", "Tatooine", "Naboo", "Tatooine", "Alder...
## $ species <chr> "Human", "Droid", "Droid", "Human", "Human", "Human...
## $ films <list> [<"Revenge of the Sith", "Return of the Jedi", "Th...
## $ vehicles <list> [<"Snowspeeder", "Imperial Speeder Bike">, <>, <>,...
## $ starships <list> [<"X-wing", "Imperial shuttle">, <>, <>, "TIE Adva...
str(unclass(starwars))
## List of 13
## $ name : chr [1:87] "Luke Skywalker" "C-3PO" "R2-D2" "Darth Vader" ...
## $ height : int [1:87] 172 167 96 202 150 178 165 97 183 182 ...
## $ mass : num [1:87] 77 75 32 136 49 120 75 32 84 77 ...
## $ hair_color: chr [1:87] "blond" NA NA "none" ...
## $ skin_color: chr [1:87] "fair" "gold" "white, blue" "white" ...
## $ eye_color : chr [1:87] "blue" "yellow" "red" "yellow" ...
## $ birth_year: num [1:87] 19 112 33 41.9 19 52 47 NA 24 57 ...
## $ gender : chr [1:87] "male" NA NA "male" ...
## $ homeworld : chr [1:87] "Tatooine" "Tatooine" "Naboo" "Tatooine" ...
## $ species : chr [1:87] "Human" "Droid" "Droid" "Human" ...
## $ films :List of 87
## ..$ : chr [1:5] "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope" ...
## ..$ : chr [1:6] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr [1:7] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr [1:4] "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope"
## ..$ : chr [1:5] "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope" ...
## ..$ : chr [1:3] "Attack of the Clones" "Revenge of the Sith" "A New Hope"
## ..$ : chr [1:3] "Attack of the Clones" "Revenge of the Sith" "A New Hope"
## ..$ : chr "A New Hope"
## ..$ : chr "A New Hope"
## ..$ : chr [1:6] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr [1:2] "Revenge of the Sith" "A New Hope"
## ..$ : chr [1:5] "Revenge of the Sith" "Return of the Jedi" "The Empire Strikes Back" "A New Hope" ...
## ..$ : chr [1:4] "Return of the Jedi" "The Empire Strikes Back" "A New Hope" "The Force Awakens"
## ..$ : chr "A New Hope"
## ..$ : chr [1:3] "The Phantom Menace" "Return of the Jedi" "A New Hope"
## ..$ : chr [1:3] "Return of the Jedi" "The Empire Strikes Back" "A New Hope"
## ..$ : chr "A New Hope"
## ..$ : chr [1:5] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr [1:5] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith" "Return of the Jedi" ...
## ..$ : chr [1:3] "Attack of the Clones" "Return of the Jedi" "The Empire Strikes Back"
## ..$ : chr "The Empire Strikes Back"
## ..$ : chr "The Empire Strikes Back"
## ..$ : chr [1:2] "Return of the Jedi" "The Empire Strikes Back"
## ..$ : chr "The Empire Strikes Back"
## ..$ : chr [1:2] "Return of the Jedi" "The Force Awakens"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "Return of the Jedi"
## ..$ : chr "The Phantom Menace"
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace"
## ..$ : chr [1:2] "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr [1:2] "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr [1:2] "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "Return of the Jedi"
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr "The Phantom Menace"
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr [1:2] "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr [1:2] "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr [1:2] "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr "The Phantom Menace"
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## ..$ : chr [1:2] "Attack of the Clones" "The Phantom Menace"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr [1:2] "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr [1:2] "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr [1:2] "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr [1:2] "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "The Phantom Menace"
## ..$ : chr [1:2] "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Attack of the Clones"
## ..$ : chr "Attack of the Clones"
## ..$ : chr [1:2] "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith"
## ..$ : chr [1:2] "Revenge of the Sith" "A New Hope"
## ..$ : chr [1:2] "Attack of the Clones" "Revenge of the Sith"
## ..$ : chr "Revenge of the Sith"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr "The Force Awakens"
## ..$ : chr [1:3] "Attack of the Clones" "The Phantom Menace" "Revenge of the Sith"
## $ vehicles :List of 87
## ..$ : chr [1:2] "Snowspeeder" "Imperial Speeder Bike"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Imperial Speeder Bike"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Tribubble bongo"
## ..$ : chr [1:2] "Zephyr-G swoop bike" "XJ-6 airspeeder"
## ..$ : chr(0)
## ..$ : chr "AT-ST"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Snowspeeder"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Tribubble bongo"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Sith speeder"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Flitknot speeder"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Koro-2 Exodrive airspeeder"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Tsmeu-6 personal wheel bike"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## $ starships :List of 87
## ..$ : chr [1:2] "X-wing" "Imperial shuttle"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "TIE Advanced x1"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "X-wing"
## ..$ : chr [1:5] "Jedi starfighter" "Trade Federation cruiser" "Naboo star skiff" "Jedi Interceptor" ...
## ..$ : chr [1:3] "Trade Federation cruiser" "Jedi Interceptor" "Naboo fighter"
## ..$ : chr(0)
## ..$ : chr [1:2] "Millennium Falcon" "Imperial shuttle"
## ..$ : chr [1:2] "Millennium Falcon" "Imperial shuttle"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "X-wing"
## ..$ : chr "X-wing"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Slave 1"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Millennium Falcon"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "A-wing"
## ..$ : chr(0)
## ..$ : chr "Millennium Falcon"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Naboo Royal Starship"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Scimitar"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Jedi starfighter"
## ..$ : chr(0)
## ..$ : chr "Naboo fighter"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "Belbullab-22 starfighter"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr "T-70 X-wing fighter"
## ..$ : chr(0)
## ..$ : chr(0)
## ..$ : chr [1:3] "H-type Nubian yacht" "Naboo star skiff" "Naboo fighter"
## - attr(*, "row.names")= int [1:87] 1 2 3 4 5 6 7 8 9 10 ...
The reading covered some operations. We’ll cover more in other classes And we’ll continue discussing data frames in the 5th and final segment for this one. ### More info
Read these. Alot. You’ll get spot quizzes occassionally about some esoteric edge cases.
help("data.frame")
?tibble::data_frame
help("unclass")
help("str")
help("glimpse")
## Help on topic 'glimpse' was found in the following packages:
##
## Package Library
## tibble /usr/local/lib/R/site-library
## dplyr /usr/local/lib/R/site-library
##
##
## Using the first match ...
help("dim")