Question 1(a)


chickwts dataset - Chicken Weights by Feed Type

Description -

An experiment was conducted to measure and compare the effectiveness of various feed supplements on the growth rate of chickens.

Chicken Weights by Feed Type Data sets

weight feed
179 horsebean
160 horsebean
136 horsebean
227 horsebean
217 horsebean
168 horsebean
108 horsebean
124 horsebean
143 horsebean
140 horsebean
309 linseed
229 linseed
181 linseed
141 linseed
260 linseed
203 linseed
148 linseed
169 linseed
213 linseed
257 linseed
244 linseed
271 linseed
243 soybean
230 soybean
248 soybean
327 soybean
329 soybean
250 soybean
193 soybean
271 soybean
316 soybean
267 soybean
199 soybean
171 soybean
158 soybean
248 soybean
423 sunflower
340 sunflower
392 sunflower
339 sunflower
341 sunflower
226 sunflower
320 sunflower
295 sunflower
334 sunflower
322 sunflower
297 sunflower
318 sunflower
325 meatmeal
257 meatmeal
303 meatmeal
315 meatmeal
380 meatmeal
153 meatmeal
263 meatmeal
242 meatmeal
206 meatmeal
344 meatmeal
258 meatmeal
368 casein
390 casein
379 casein
260 casein
404 casein
318 casein
352 casein
359 casein
216 casein
222 casein
283 casein
332 casein

Highest recorded weight of chicken by Feed Type

Based on the bar chart, sunflower has the highest recorded weight of the chicken because it is the most nutritious out of other feed type

Lowest recorded weight of chicken by Feed Type

Based on the bar chart, lowest weight recorded is horse bean as it lacks of crucial nutrition for the chicken to gain weight

Chicken Weights by Feed Type Codebook

## ================================================================================
## 
##    weight
## 
## --------------------------------------------------------------------------------
## 
##    Storage mode: double
## 
##         Min: 108.000
##         Max: 423.000
##        Mean: 261.310
##    Std.Dev.:  77.522
##    Skewness:  -0.012
##    Kurtosis:  -0.907
## 
## ================================================================================
## 
##    feed
## 
## --------------------------------------------------------------------------------
## 
##    Storage mode: integer
##    Factor with 6 levels
## 
##    Levels and labels     N Valid
##                                 
##    1 'casein'           12  16.9
##    2 'horsebean'        10  14.1
##    3 'linseed'          12  16.9
##    4 'meatmeal'         11  15.5
##    5 'soybean'          14  19.7
##    6 'sunflower'        12  16.9

Data Frame Summary

chickenwtsData

Dimensions: 71 x 2
Duplicates: 1
No Variable Stats / Values Freqs (% of Valid) Graph Valid Missing
1 weight [numeric]
Mean (sd) : 261.3 (78.1)
min ≤ med ≤ max:
108 ≤ 258 ≤ 423
IQR (CV) : 119 (0.3)
66 distinct values 71 (100.0%) 0 (0.0%)
2 feed [factor]
1. casein
2. horsebean
3. linseed
4. meatmeal
5. soybean
6. sunflower
12(16.9%)
10(14.1%)
12(16.9%)
11(15.5%)
14(19.7%)
12(16.9%)
71 (100.0%) 0 (0.0%)

Generated by summarytools 1.0.0 (R version 4.1.2)
2021-12-31


Question 1(b)


Top 50 movies from IMDb

Description

The data sets provides the information top 50 adventure movies

The Feature Movies by IMDb datasets

X name year rating synopsis stringAsFactors
1 The Lord of the Rings: The Return of the King (2003) 8.9 Gandalf and Aragorn lead the World of Men against Sauron’s army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring. FALSE
2 Inception (2010) 8.8 A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O., but his tragic past may doom the project and his team to disaster. FALSE
3 The Lord of the Rings: The Fellowship of the Ring (2001) 8.8 A meek Hobbit from the Shire and eight companions set out on a journey to destroy the powerful One Ring and save Middle-earth from the Dark Lord Sauron. FALSE
4 Il buono, il brutto, il cattivo (1966) 8.8 A bounty hunting scam joins two men in an uneasy alliance against a third in a race to find a fortune in gold buried in a remote cemetery. FALSE
5 The Lord of the Rings: The Two Towers (2002) 8.7 While Frodo and Sam edge closer to Mordor with the help of the shifty Gollum, the divided fellowship makes a stand against Sauron’s new ally, Saruman, and his hordes of Isengard. FALSE
6 Star Wars: Episode V - The Empire Strikes Back (1980) 8.7 After the Rebels are brutally overpowered by the Empire on the ice planet Hoth, Luke Skywalker begins Jedi training with Yoda, while his friends are pursued across the galaxy by Darth Vader and bounty hunter Boba Fett. FALSE
7 Interstellar (2014) 8.6 A team of explorers travel through a wormhole in space in an attempt to ensure humanity’s survival. FALSE
8 Sen to Chihiro no kamikakushi (2001) 8.6 During her family’s move to the suburbs, a sullen 10-year-old girl wanders into a world ruled by gods, witches, and spirits, and where humans are changed into beasts. FALSE
9 Star Wars (1977) 8.6 Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a Wookiee and two droids to save the galaxy from the Empire’s world-destroying battle station, while also attempting to rescue Princess Leia from the mysterious Darth Vader. FALSE
10 Shichinin no samurai (1954) 8.6 A poor village under attack by bandits recruits seven unemployed samurai to help them defend themselves. FALSE
11 Gladiator (2000) 8.5 A former Roman General sets out to exact vengeance against the corrupt emperor who murdered his family and sent him into slavery. FALSE
12 The Lion King (1994) 8.5 Lion prince Simba and his father are targeted by his bitter uncle, who wants to ascend the throne himself. FALSE
13 Back to the Future (1985) 8.5 Marty McFly, a 17-year-old high school student, is accidentally sent thirty years into the past in a time-traveling DeLorean invented by his close friend, the eccentric scientist Doc Brown. FALSE
14 Spider-Man: Into the Spider-Verse (2018) 8.4 Teen Miles Morales becomes the Spider-Man of his universe, and must join with five spider-powered individuals from other dimensions to stop a threat for all realities. FALSE
15 Avengers: Endgame (2019) 8.4 After the devastating events of Avengers: Infinity War (2018), the universe is in ruins. With the help of remaining allies, the Avengers assemble once more in order to reverse Thanos’ actions and restore balance to the universe. FALSE
16 Avengers: Infinity War (2018) 8.4 The Avengers and their allies must be willing to sacrifice all in an attempt to defeat the powerful Thanos before his blitz of devastation and ruin puts an end to the universe. FALSE
17 Coco (I) (2017) 8.4 Aspiring musician Miguel, confronted with his family’s ancestral ban on music, enters the Land of the Dead to find his great-great-grandfather, a legendary singer. FALSE
18 WALL·E (2008) 8.4 In the distant future, a small waste-collecting robot inadvertently embarks on a space journey that will ultimately decide the fate of mankind. FALSE
19 Mononoke-hime (1997) 8.4 On a journey to find the cure for a Tatarigami’s curse, Ashitaka finds himself in the middle of a war between the forest gods and Tatara, a mining colony. In this quest he also meets San, the Mononoke Hime. FALSE
20 Raiders of the Lost Ark (1981) 8.4 In 1936, archaeologist and adventurer Indiana Jones is hired by the U.S. government to find the Ark of the Covenant before Adolf Hitler’s Nazis can obtain its awesome powers. FALSE
21 Kimetsu no Yaiba: Mugen Ressha-Hen (2020) 8.3 After his family was brutally murdered and his sister turned into a demon, Tanjiro Kamado’s journey as a demon slayer began. Tanjiro and his comrades embark on a new mission aboard the Mugen Train, on track to despair. FALSE
22 Inglourious Basterds (2009) 8.3 In Nazi-occupied France during World War II, a plan to assassinate Nazi leaders by a group of Jewish U.S. soldiers coincides with a theatre owner’s vengeful plans for the same. FALSE
23 Toy Story (1995) 8.3 A cowboy doll is profoundly threatened and jealous when a new spaceman figure supplants him as top toy in a boy’s room. FALSE
24 Aliens (1986) 8.3 Fifty-seven years after surviving an apocalyptic attack aboard her space vessel by merciless space creatures, Officer Ripley awakens from hyper-sleep and tries to warn anyone who will listen about the predators. FALSE
25 Star Wars: Episode VI - Return of the Jedi (1983) 8.3 After a daring mission to rescue Han Solo from Jabba the Hutt, the Rebels dispatch to Endor to destroy the second Death Star. Meanwhile, Luke struggles to help Darth Vader back from the dark side without falling into the Emperor’s trap. FALSE
26 Das Boot (1981) 8.3 The claustrophobic world of a WWII German U-boat; boredom, filth and sheer terror. FALSE
27 Dersu Uzala (1975) 8.3 The Russian army sends an explorer on an expedition to the snowy Siberian wilderness where he makes friends with a seasoned local hunter. FALSE
28 2001: A Space Odyssey (1968) 8.3 The Monoliths push humanity to reach for the stars; after their discovery in Africa generations ago, the mysterious objects lead mankind on an awesome journey to Jupiter, with the help of H.A.L. 9000: the world’s greatest supercomputer. FALSE
29 Lawrence of Arabia (1962) 8.3 The story of T.E. Lawrence, the English officer who successfully united and led the diverse, often warring, Arab tribes during World War I in order to fight the Turks. FALSE
30 North by Northwest (1959) 8.3 A New York City advertising executive goes on the run after being mistaken for a government agent by a group of foreign spies, and falls for a woman whose loyalties he begins to doubt. FALSE
31 Klaus (2019) 8.2 A simple act of kindness always sparks another, even in a frozen, faraway place. When Smeerensburg’s new postman, Jesper, befriends toymaker Klaus, their gifts melt an age-old feud and deliver a sleigh full of holiday traditions. FALSE
32 Queen (2013) 8.2 A Delhi girl from a traditional family sets out on a solo honeymoon after her marriage gets cancelled. FALSE
33 Dune: Part One (2021) 8.2 Feature adaptation of Frank Herbert’s science fiction novel, about the son of a noble family entrusted with the protection of the most valuable asset and most vital element in the galaxy. FALSE
34 Up (2009) 8.2 78-year-old Carl Fredricksen travels to Paradise Falls in his house equipped with balloons, inadvertently taking a young stowaway. FALSE
35 Toy Story 3 (2010) 8.2 The toys are mistakenly delivered to a day-care center instead of the attic right before Andy leaves for college, and it’s up to Woody to convince the other toys that they weren’t abandoned and to return home. FALSE
36 Batman Begins (2005) 8.2 After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from corruption. FALSE
37 Hauru no ugoku shiro (2004) 8.2 When an unconfident young woman is cursed with an old body by a spiteful witch, her only chance of breaking the spell lies with a self-indulgent yet insecure young wizard and his companions in his legged, walking castle. FALSE
38 Indiana Jones and the Last Crusade (1989) 8.2 In 1938, after his father Professor Henry Jones, Sr. goes missing while pursuing the Holy Grail, Professor Henry “Indiana” Jones, Jr. finds himself up against Adolf Hitler’s Nazis again to stop them from obtaining its powers. FALSE
39 Sholay (1975) 8.2 After his family is murdered by a notorious and ruthless bandit, a former police officer enlists the services of two outlaws to capture the bandit. FALSE
40 Monty Python and the Holy Grail (1975) 8.2 King Arthur and his Knights of the Round Table embark on a surreal, low-budget search for the Holy Grail, encountering many, very silly obstacles. FALSE
41 The Great Escape (1963) 8.2 Allied prisoners of war plan for several hundred of their number to escape from a German camp during World War II. FALSE
42 The Treasure of the Sierra Madre (1948) 8.2 Two down-on-their-luck Americans searching for work in 1920s Mexico convince an old prospector to help them mine for gold in the Sierra Madre Mountains. FALSE
43 The Gold Rush (1925) 8.2 A prospector goes to the Klondike during the 1890s gold rush in hopes of making his fortune, and is smitten with a girl he sees in a dance hall. FALSE
44 Soul (2020) 8.1 After landing the gig of a lifetime, a New York jazz pianist suddenly finds himself trapped in a strange land between Earth and the afterlife. FALSE
45 The Grand Budapest Hotel (2014) 8.1 A writer encounters the owner of an aging high-class hotel, who tells him of his early years serving as a lobby boy in the hotel’s glorious years under an exceptional concierge. FALSE
46 Inside Out (I) (2015) 8.1 After young Riley is uprooted from her Midwest life and moved to San Francisco, her emotions - Joy, Fear, Anger, Disgust and Sadness - conflict on how best to navigate a new city, house, and school. FALSE
47 Song of the Sea (2014) 8.1 Ben, a young Irish boy, and his little sister Saoirse, a girl who can turn into a seal, go on an adventure to free the fairies and save the spirit world. FALSE
48 Mad Max: Fury Road (2015) 8.1 In a post-apocalyptic wasteland, a woman rebels against a tyrannical ruler in search for her homeland with the aid of a group of female prisoners, a psychotic worshiper, and a drifter named Max. FALSE
49 Zack Snyder’s Justice League (2021) 8.1 Determined to ensure Superman’s ultimate sacrifice was not in vain, Bruce Wayne aligns forces with Diana Prince with plans to recruit a team of metahumans to protect the world from an approaching threat of catastrophic proportions. FALSE
50 Harry Potter and the Deathly Hallows: Part 2 (2011) 8.1 Harry, Ron, and Hermione search for Voldemort’s remaining Horcruxes in their effort to destroy the Dark Lord as the final battle rages on at Hogwarts. FALSE

i.filter()

this function will select the rows based on their values.

###For example, a new dataset will be generated only with ratings = 8.3 using the code below

moviesData1 <- filter(movies, rating == 8.3)
kable(moviesData1)
X name year rating synopsis stringAsFactors
21 Kimetsu no Yaiba: Mugen Ressha-Hen (2020) 8.3 After his family was brutally murdered and his sister turned into a demon, Tanjiro Kamado’s journey as a demon slayer began. Tanjiro and his comrades embark on a new mission aboard the Mugen Train, on track to despair. FALSE
22 Inglourious Basterds (2009) 8.3 In Nazi-occupied France during World War II, a plan to assassinate Nazi leaders by a group of Jewish U.S. soldiers coincides with a theatre owner’s vengeful plans for the same. FALSE
23 Toy Story (1995) 8.3 A cowboy doll is profoundly threatened and jealous when a new spaceman figure supplants him as top toy in a boy’s room. FALSE
24 Aliens (1986) 8.3 Fifty-seven years after surviving an apocalyptic attack aboard her space vessel by merciless space creatures, Officer Ripley awakens from hyper-sleep and tries to warn anyone who will listen about the predators. FALSE
25 Star Wars: Episode VI - Return of the Jedi (1983) 8.3 After a daring mission to rescue Han Solo from Jabba the Hutt, the Rebels dispatch to Endor to destroy the second Death Star. Meanwhile, Luke struggles to help Darth Vader back from the dark side without falling into the Emperor’s trap. FALSE
26 Das Boot (1981) 8.3 The claustrophobic world of a WWII German U-boat; boredom, filth and sheer terror. FALSE
27 Dersu Uzala (1975) 8.3 The Russian army sends an explorer on an expedition to the snowy Siberian wilderness where he makes friends with a seasoned local hunter. FALSE
28 2001: A Space Odyssey (1968) 8.3 The Monoliths push humanity to reach for the stars; after their discovery in Africa generations ago, the mysterious objects lead mankind on an awesome journey to Jupiter, with the help of H.A.L. 9000: the world’s greatest supercomputer. FALSE
29 Lawrence of Arabia (1962) 8.3 The story of T.E. Lawrence, the English officer who successfully united and led the diverse, often warring, Arab tribes during World War I in order to fight the Turks. FALSE
30 North by Northwest (1959) 8.3 A New York City advertising executive goes on the run after being mistaken for a government agent by a group of foreign spies, and falls for a woman whose loyalties he begins to doubt. FALSE

ii. arrange()

this function will sort out the row.

for example, a dataset arranged in years ascending will be generated using the code below

moviesData2 <- arrange(movies, year)
kable(moviesData2)
X name year rating synopsis stringAsFactors
43 The Gold Rush (1925) 8.2 A prospector goes to the Klondike during the 1890s gold rush in hopes of making his fortune, and is smitten with a girl he sees in a dance hall. FALSE
42 The Treasure of the Sierra Madre (1948) 8.2 Two down-on-their-luck Americans searching for work in 1920s Mexico convince an old prospector to help them mine for gold in the Sierra Madre Mountains. FALSE
10 Shichinin no samurai (1954) 8.6 A poor village under attack by bandits recruits seven unemployed samurai to help them defend themselves. FALSE
30 North by Northwest (1959) 8.3 A New York City advertising executive goes on the run after being mistaken for a government agent by a group of foreign spies, and falls for a woman whose loyalties he begins to doubt. FALSE
29 Lawrence of Arabia (1962) 8.3 The story of T.E. Lawrence, the English officer who successfully united and led the diverse, often warring, Arab tribes during World War I in order to fight the Turks. FALSE
41 The Great Escape (1963) 8.2 Allied prisoners of war plan for several hundred of their number to escape from a German camp during World War II. FALSE
4 Il buono, il brutto, il cattivo (1966) 8.8 A bounty hunting scam joins two men in an uneasy alliance against a third in a race to find a fortune in gold buried in a remote cemetery. FALSE
28 2001: A Space Odyssey (1968) 8.3 The Monoliths push humanity to reach for the stars; after their discovery in Africa generations ago, the mysterious objects lead mankind on an awesome journey to Jupiter, with the help of H.A.L. 9000: the world’s greatest supercomputer. FALSE
27 Dersu Uzala (1975) 8.3 The Russian army sends an explorer on an expedition to the snowy Siberian wilderness where he makes friends with a seasoned local hunter. FALSE
39 Sholay (1975) 8.2 After his family is murdered by a notorious and ruthless bandit, a former police officer enlists the services of two outlaws to capture the bandit. FALSE
40 Monty Python and the Holy Grail (1975) 8.2 King Arthur and his Knights of the Round Table embark on a surreal, low-budget search for the Holy Grail, encountering many, very silly obstacles. FALSE
9 Star Wars (1977) 8.6 Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a Wookiee and two droids to save the galaxy from the Empire’s world-destroying battle station, while also attempting to rescue Princess Leia from the mysterious Darth Vader. FALSE
6 Star Wars: Episode V - The Empire Strikes Back (1980) 8.7 After the Rebels are brutally overpowered by the Empire on the ice planet Hoth, Luke Skywalker begins Jedi training with Yoda, while his friends are pursued across the galaxy by Darth Vader and bounty hunter Boba Fett. FALSE
20 Raiders of the Lost Ark (1981) 8.4 In 1936, archaeologist and adventurer Indiana Jones is hired by the U.S. government to find the Ark of the Covenant before Adolf Hitler’s Nazis can obtain its awesome powers. FALSE
26 Das Boot (1981) 8.3 The claustrophobic world of a WWII German U-boat; boredom, filth and sheer terror. FALSE
25 Star Wars: Episode VI - Return of the Jedi (1983) 8.3 After a daring mission to rescue Han Solo from Jabba the Hutt, the Rebels dispatch to Endor to destroy the second Death Star. Meanwhile, Luke struggles to help Darth Vader back from the dark side without falling into the Emperor’s trap. FALSE
13 Back to the Future (1985) 8.5 Marty McFly, a 17-year-old high school student, is accidentally sent thirty years into the past in a time-traveling DeLorean invented by his close friend, the eccentric scientist Doc Brown. FALSE
24 Aliens (1986) 8.3 Fifty-seven years after surviving an apocalyptic attack aboard her space vessel by merciless space creatures, Officer Ripley awakens from hyper-sleep and tries to warn anyone who will listen about the predators. FALSE
38 Indiana Jones and the Last Crusade (1989) 8.2 In 1938, after his father Professor Henry Jones, Sr. goes missing while pursuing the Holy Grail, Professor Henry “Indiana” Jones, Jr. finds himself up against Adolf Hitler’s Nazis again to stop them from obtaining its powers. FALSE
12 The Lion King (1994) 8.5 Lion prince Simba and his father are targeted by his bitter uncle, who wants to ascend the throne himself. FALSE
23 Toy Story (1995) 8.3 A cowboy doll is profoundly threatened and jealous when a new spaceman figure supplants him as top toy in a boy’s room. FALSE
19 Mononoke-hime (1997) 8.4 On a journey to find the cure for a Tatarigami’s curse, Ashitaka finds himself in the middle of a war between the forest gods and Tatara, a mining colony. In this quest he also meets San, the Mononoke Hime. FALSE
11 Gladiator (2000) 8.5 A former Roman General sets out to exact vengeance against the corrupt emperor who murdered his family and sent him into slavery. FALSE
3 The Lord of the Rings: The Fellowship of the Ring (2001) 8.8 A meek Hobbit from the Shire and eight companions set out on a journey to destroy the powerful One Ring and save Middle-earth from the Dark Lord Sauron. FALSE
8 Sen to Chihiro no kamikakushi (2001) 8.6 During her family’s move to the suburbs, a sullen 10-year-old girl wanders into a world ruled by gods, witches, and spirits, and where humans are changed into beasts. FALSE
5 The Lord of the Rings: The Two Towers (2002) 8.7 While Frodo and Sam edge closer to Mordor with the help of the shifty Gollum, the divided fellowship makes a stand against Sauron’s new ally, Saruman, and his hordes of Isengard. FALSE
1 The Lord of the Rings: The Return of the King (2003) 8.9 Gandalf and Aragorn lead the World of Men against Sauron’s army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring. FALSE
37 Hauru no ugoku shiro (2004) 8.2 When an unconfident young woman is cursed with an old body by a spiteful witch, her only chance of breaking the spell lies with a self-indulgent yet insecure young wizard and his companions in his legged, walking castle. FALSE
36 Batman Begins (2005) 8.2 After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from corruption. FALSE
18 WALL·E (2008) 8.4 In the distant future, a small waste-collecting robot inadvertently embarks on a space journey that will ultimately decide the fate of mankind. FALSE
22 Inglourious Basterds (2009) 8.3 In Nazi-occupied France during World War II, a plan to assassinate Nazi leaders by a group of Jewish U.S. soldiers coincides with a theatre owner’s vengeful plans for the same. FALSE
34 Up (2009) 8.2 78-year-old Carl Fredricksen travels to Paradise Falls in his house equipped with balloons, inadvertently taking a young stowaway. FALSE
2 Inception (2010) 8.8 A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O., but his tragic past may doom the project and his team to disaster. FALSE
35 Toy Story 3 (2010) 8.2 The toys are mistakenly delivered to a day-care center instead of the attic right before Andy leaves for college, and it’s up to Woody to convince the other toys that they weren’t abandoned and to return home. FALSE
50 Harry Potter and the Deathly Hallows: Part 2 (2011) 8.1 Harry, Ron, and Hermione search for Voldemort’s remaining Horcruxes in their effort to destroy the Dark Lord as the final battle rages on at Hogwarts. FALSE
32 Queen (2013) 8.2 A Delhi girl from a traditional family sets out on a solo honeymoon after her marriage gets cancelled. FALSE
7 Interstellar (2014) 8.6 A team of explorers travel through a wormhole in space in an attempt to ensure humanity’s survival. FALSE
45 The Grand Budapest Hotel (2014) 8.1 A writer encounters the owner of an aging high-class hotel, who tells him of his early years serving as a lobby boy in the hotel’s glorious years under an exceptional concierge. FALSE
47 Song of the Sea (2014) 8.1 Ben, a young Irish boy, and his little sister Saoirse, a girl who can turn into a seal, go on an adventure to free the fairies and save the spirit world. FALSE
48 Mad Max: Fury Road (2015) 8.1 In a post-apocalyptic wasteland, a woman rebels against a tyrannical ruler in search for her homeland with the aid of a group of female prisoners, a psychotic worshiper, and a drifter named Max. FALSE
14 Spider-Man: Into the Spider-Verse (2018) 8.4 Teen Miles Morales becomes the Spider-Man of his universe, and must join with five spider-powered individuals from other dimensions to stop a threat for all realities. FALSE
16 Avengers: Infinity War (2018) 8.4 The Avengers and their allies must be willing to sacrifice all in an attempt to defeat the powerful Thanos before his blitz of devastation and ruin puts an end to the universe. FALSE
15 Avengers: Endgame (2019) 8.4 After the devastating events of Avengers: Infinity War (2018), the universe is in ruins. With the help of remaining allies, the Avengers assemble once more in order to reverse Thanos’ actions and restore balance to the universe. FALSE
31 Klaus (2019) 8.2 A simple act of kindness always sparks another, even in a frozen, faraway place. When Smeerensburg’s new postman, Jesper, befriends toymaker Klaus, their gifts melt an age-old feud and deliver a sleigh full of holiday traditions. FALSE
21 Kimetsu no Yaiba: Mugen Ressha-Hen (2020) 8.3 After his family was brutally murdered and his sister turned into a demon, Tanjiro Kamado’s journey as a demon slayer began. Tanjiro and his comrades embark on a new mission aboard the Mugen Train, on track to despair. FALSE
44 Soul (2020) 8.1 After landing the gig of a lifetime, a New York jazz pianist suddenly finds himself trapped in a strange land between Earth and the afterlife. FALSE
33 Dune: Part One (2021) 8.2 Feature adaptation of Frank Herbert’s science fiction novel, about the son of a noble family entrusted with the protection of the most valuable asset and most vital element in the galaxy. FALSE
49 Zack Snyder’s Justice League (2021) 8.1 Determined to ensure Superman’s ultimate sacrifice was not in vain, Bruce Wayne aligns forces with Diana Prince with plans to recruit a team of metahumans to protect the world from an approaching threat of catastrophic proportions. FALSE
46 Inside Out (I) (2015) 8.1 After young Riley is uprooted from her Midwest life and moved to San Francisco, her emotions - Joy, Fear, Anger, Disgust and Sadness - conflict on how best to navigate a new city, house, and school. FALSE
17 Coco (I) (2017) 8.4 Aspiring musician Miguel, confronted with his family’s ancestral ban on music, enters the Land of the Dead to find his great-great-grandfather, a legendary singer. FALSE

iii.mutate()

this function will create new variables

For example.The code below will divide all the rating by half

moviesData3 <- mutate(movies, rating = as.double(rating)/2)
kable(moviesData3)
X name year rating synopsis stringAsFactors
1 The Lord of the Rings: The Return of the King (2003) 4.45 Gandalf and Aragorn lead the World of Men against Sauron’s army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring. FALSE
2 Inception (2010) 4.40 A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O., but his tragic past may doom the project and his team to disaster. FALSE
3 The Lord of the Rings: The Fellowship of the Ring (2001) 4.40 A meek Hobbit from the Shire and eight companions set out on a journey to destroy the powerful One Ring and save Middle-earth from the Dark Lord Sauron. FALSE
4 Il buono, il brutto, il cattivo (1966) 4.40 A bounty hunting scam joins two men in an uneasy alliance against a third in a race to find a fortune in gold buried in a remote cemetery. FALSE
5 The Lord of the Rings: The Two Towers (2002) 4.35 While Frodo and Sam edge closer to Mordor with the help of the shifty Gollum, the divided fellowship makes a stand against Sauron’s new ally, Saruman, and his hordes of Isengard. FALSE
6 Star Wars: Episode V - The Empire Strikes Back (1980) 4.35 After the Rebels are brutally overpowered by the Empire on the ice planet Hoth, Luke Skywalker begins Jedi training with Yoda, while his friends are pursued across the galaxy by Darth Vader and bounty hunter Boba Fett. FALSE
7 Interstellar (2014) 4.30 A team of explorers travel through a wormhole in space in an attempt to ensure humanity’s survival. FALSE
8 Sen to Chihiro no kamikakushi (2001) 4.30 During her family’s move to the suburbs, a sullen 10-year-old girl wanders into a world ruled by gods, witches, and spirits, and where humans are changed into beasts. FALSE
9 Star Wars (1977) 4.30 Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a Wookiee and two droids to save the galaxy from the Empire’s world-destroying battle station, while also attempting to rescue Princess Leia from the mysterious Darth Vader. FALSE
10 Shichinin no samurai (1954) 4.30 A poor village under attack by bandits recruits seven unemployed samurai to help them defend themselves. FALSE
11 Gladiator (2000) 4.25 A former Roman General sets out to exact vengeance against the corrupt emperor who murdered his family and sent him into slavery. FALSE
12 The Lion King (1994) 4.25 Lion prince Simba and his father are targeted by his bitter uncle, who wants to ascend the throne himself. FALSE
13 Back to the Future (1985) 4.25 Marty McFly, a 17-year-old high school student, is accidentally sent thirty years into the past in a time-traveling DeLorean invented by his close friend, the eccentric scientist Doc Brown. FALSE
14 Spider-Man: Into the Spider-Verse (2018) 4.20 Teen Miles Morales becomes the Spider-Man of his universe, and must join with five spider-powered individuals from other dimensions to stop a threat for all realities. FALSE
15 Avengers: Endgame (2019) 4.20 After the devastating events of Avengers: Infinity War (2018), the universe is in ruins. With the help of remaining allies, the Avengers assemble once more in order to reverse Thanos’ actions and restore balance to the universe. FALSE
16 Avengers: Infinity War (2018) 4.20 The Avengers and their allies must be willing to sacrifice all in an attempt to defeat the powerful Thanos before his blitz of devastation and ruin puts an end to the universe. FALSE
17 Coco (I) (2017) 4.20 Aspiring musician Miguel, confronted with his family’s ancestral ban on music, enters the Land of the Dead to find his great-great-grandfather, a legendary singer. FALSE
18 WALL·E (2008) 4.20 In the distant future, a small waste-collecting robot inadvertently embarks on a space journey that will ultimately decide the fate of mankind. FALSE
19 Mononoke-hime (1997) 4.20 On a journey to find the cure for a Tatarigami’s curse, Ashitaka finds himself in the middle of a war between the forest gods and Tatara, a mining colony. In this quest he also meets San, the Mononoke Hime. FALSE
20 Raiders of the Lost Ark (1981) 4.20 In 1936, archaeologist and adventurer Indiana Jones is hired by the U.S. government to find the Ark of the Covenant before Adolf Hitler’s Nazis can obtain its awesome powers. FALSE
21 Kimetsu no Yaiba: Mugen Ressha-Hen (2020) 4.15 After his family was brutally murdered and his sister turned into a demon, Tanjiro Kamado’s journey as a demon slayer began. Tanjiro and his comrades embark on a new mission aboard the Mugen Train, on track to despair. FALSE
22 Inglourious Basterds (2009) 4.15 In Nazi-occupied France during World War II, a plan to assassinate Nazi leaders by a group of Jewish U.S. soldiers coincides with a theatre owner’s vengeful plans for the same. FALSE
23 Toy Story (1995) 4.15 A cowboy doll is profoundly threatened and jealous when a new spaceman figure supplants him as top toy in a boy’s room. FALSE
24 Aliens (1986) 4.15 Fifty-seven years after surviving an apocalyptic attack aboard her space vessel by merciless space creatures, Officer Ripley awakens from hyper-sleep and tries to warn anyone who will listen about the predators. FALSE
25 Star Wars: Episode VI - Return of the Jedi (1983) 4.15 After a daring mission to rescue Han Solo from Jabba the Hutt, the Rebels dispatch to Endor to destroy the second Death Star. Meanwhile, Luke struggles to help Darth Vader back from the dark side without falling into the Emperor’s trap. FALSE
26 Das Boot (1981) 4.15 The claustrophobic world of a WWII German U-boat; boredom, filth and sheer terror. FALSE
27 Dersu Uzala (1975) 4.15 The Russian army sends an explorer on an expedition to the snowy Siberian wilderness where he makes friends with a seasoned local hunter. FALSE
28 2001: A Space Odyssey (1968) 4.15 The Monoliths push humanity to reach for the stars; after their discovery in Africa generations ago, the mysterious objects lead mankind on an awesome journey to Jupiter, with the help of H.A.L. 9000: the world’s greatest supercomputer. FALSE
29 Lawrence of Arabia (1962) 4.15 The story of T.E. Lawrence, the English officer who successfully united and led the diverse, often warring, Arab tribes during World War I in order to fight the Turks. FALSE
30 North by Northwest (1959) 4.15 A New York City advertising executive goes on the run after being mistaken for a government agent by a group of foreign spies, and falls for a woman whose loyalties he begins to doubt. FALSE
31 Klaus (2019) 4.10 A simple act of kindness always sparks another, even in a frozen, faraway place. When Smeerensburg’s new postman, Jesper, befriends toymaker Klaus, their gifts melt an age-old feud and deliver a sleigh full of holiday traditions. FALSE
32 Queen (2013) 4.10 A Delhi girl from a traditional family sets out on a solo honeymoon after her marriage gets cancelled. FALSE
33 Dune: Part One (2021) 4.10 Feature adaptation of Frank Herbert’s science fiction novel, about the son of a noble family entrusted with the protection of the most valuable asset and most vital element in the galaxy. FALSE
34 Up (2009) 4.10 78-year-old Carl Fredricksen travels to Paradise Falls in his house equipped with balloons, inadvertently taking a young stowaway. FALSE
35 Toy Story 3 (2010) 4.10 The toys are mistakenly delivered to a day-care center instead of the attic right before Andy leaves for college, and it’s up to Woody to convince the other toys that they weren’t abandoned and to return home. FALSE
36 Batman Begins (2005) 4.10 After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from corruption. FALSE
37 Hauru no ugoku shiro (2004) 4.10 When an unconfident young woman is cursed with an old body by a spiteful witch, her only chance of breaking the spell lies with a self-indulgent yet insecure young wizard and his companions in his legged, walking castle. FALSE
38 Indiana Jones and the Last Crusade (1989) 4.10 In 1938, after his father Professor Henry Jones, Sr. goes missing while pursuing the Holy Grail, Professor Henry “Indiana” Jones, Jr. finds himself up against Adolf Hitler’s Nazis again to stop them from obtaining its powers. FALSE
39 Sholay (1975) 4.10 After his family is murdered by a notorious and ruthless bandit, a former police officer enlists the services of two outlaws to capture the bandit. FALSE
40 Monty Python and the Holy Grail (1975) 4.10 King Arthur and his Knights of the Round Table embark on a surreal, low-budget search for the Holy Grail, encountering many, very silly obstacles. FALSE
41 The Great Escape (1963) 4.10 Allied prisoners of war plan for several hundred of their number to escape from a German camp during World War II. FALSE
42 The Treasure of the Sierra Madre (1948) 4.10 Two down-on-their-luck Americans searching for work in 1920s Mexico convince an old prospector to help them mine for gold in the Sierra Madre Mountains. FALSE
43 The Gold Rush (1925) 4.10 A prospector goes to the Klondike during the 1890s gold rush in hopes of making his fortune, and is smitten with a girl he sees in a dance hall. FALSE
44 Soul (2020) 4.05 After landing the gig of a lifetime, a New York jazz pianist suddenly finds himself trapped in a strange land between Earth and the afterlife. FALSE
45 The Grand Budapest Hotel (2014) 4.05 A writer encounters the owner of an aging high-class hotel, who tells him of his early years serving as a lobby boy in the hotel’s glorious years under an exceptional concierge. FALSE
46 Inside Out (I) (2015) 4.05 After young Riley is uprooted from her Midwest life and moved to San Francisco, her emotions - Joy, Fear, Anger, Disgust and Sadness - conflict on how best to navigate a new city, house, and school. FALSE
47 Song of the Sea (2014) 4.05 Ben, a young Irish boy, and his little sister Saoirse, a girl who can turn into a seal, go on an adventure to free the fairies and save the spirit world. FALSE
48 Mad Max: Fury Road (2015) 4.05 In a post-apocalyptic wasteland, a woman rebels against a tyrannical ruler in search for her homeland with the aid of a group of female prisoners, a psychotic worshiper, and a drifter named Max. FALSE
49 Zack Snyder’s Justice League (2021) 4.05 Determined to ensure Superman’s ultimate sacrifice was not in vain, Bruce Wayne aligns forces with Diana Prince with plans to recruit a team of metahumans to protect the world from an approaching threat of catastrophic proportions. FALSE
50 Harry Potter and the Deathly Hallows: Part 2 (2011) 4.05 Harry, Ron, and Hermione search for Voldemort’s remaining Horcruxes in their effort to destroy the Dark Lord as the final battle rages on at Hogwarts. FALSE

iv. Select()

This function will pick the columns by name

For example, the dataset that will be generated below will only select the name and the synopsis.

moviesData4 <- select(movies, name, synopsis)
kable(moviesData4)
name synopsis
The Lord of the Rings: The Return of the King Gandalf and Aragorn lead the World of Men against Sauron’s army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring.
Inception A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O., but his tragic past may doom the project and his team to disaster.
The Lord of the Rings: The Fellowship of the Ring A meek Hobbit from the Shire and eight companions set out on a journey to destroy the powerful One Ring and save Middle-earth from the Dark Lord Sauron.
Il buono, il brutto, il cattivo A bounty hunting scam joins two men in an uneasy alliance against a third in a race to find a fortune in gold buried in a remote cemetery.
The Lord of the Rings: The Two Towers While Frodo and Sam edge closer to Mordor with the help of the shifty Gollum, the divided fellowship makes a stand against Sauron’s new ally, Saruman, and his hordes of Isengard.
Star Wars: Episode V - The Empire Strikes Back After the Rebels are brutally overpowered by the Empire on the ice planet Hoth, Luke Skywalker begins Jedi training with Yoda, while his friends are pursued across the galaxy by Darth Vader and bounty hunter Boba Fett.
Interstellar A team of explorers travel through a wormhole in space in an attempt to ensure humanity’s survival.
Sen to Chihiro no kamikakushi During her family’s move to the suburbs, a sullen 10-year-old girl wanders into a world ruled by gods, witches, and spirits, and where humans are changed into beasts.
Star Wars Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a Wookiee and two droids to save the galaxy from the Empire’s world-destroying battle station, while also attempting to rescue Princess Leia from the mysterious Darth Vader.
Shichinin no samurai A poor village under attack by bandits recruits seven unemployed samurai to help them defend themselves.
Gladiator A former Roman General sets out to exact vengeance against the corrupt emperor who murdered his family and sent him into slavery.
The Lion King Lion prince Simba and his father are targeted by his bitter uncle, who wants to ascend the throne himself.
Back to the Future Marty McFly, a 17-year-old high school student, is accidentally sent thirty years into the past in a time-traveling DeLorean invented by his close friend, the eccentric scientist Doc Brown.
Spider-Man: Into the Spider-Verse Teen Miles Morales becomes the Spider-Man of his universe, and must join with five spider-powered individuals from other dimensions to stop a threat for all realities.
Avengers: Endgame After the devastating events of Avengers: Infinity War (2018), the universe is in ruins. With the help of remaining allies, the Avengers assemble once more in order to reverse Thanos’ actions and restore balance to the universe.
Avengers: Infinity War The Avengers and their allies must be willing to sacrifice all in an attempt to defeat the powerful Thanos before his blitz of devastation and ruin puts an end to the universe.
Coco Aspiring musician Miguel, confronted with his family’s ancestral ban on music, enters the Land of the Dead to find his great-great-grandfather, a legendary singer.
WALL·E In the distant future, a small waste-collecting robot inadvertently embarks on a space journey that will ultimately decide the fate of mankind.
Mononoke-hime On a journey to find the cure for a Tatarigami’s curse, Ashitaka finds himself in the middle of a war between the forest gods and Tatara, a mining colony. In this quest he also meets San, the Mononoke Hime.
Raiders of the Lost Ark In 1936, archaeologist and adventurer Indiana Jones is hired by the U.S. government to find the Ark of the Covenant before Adolf Hitler’s Nazis can obtain its awesome powers.
Kimetsu no Yaiba: Mugen Ressha-Hen After his family was brutally murdered and his sister turned into a demon, Tanjiro Kamado’s journey as a demon slayer began. Tanjiro and his comrades embark on a new mission aboard the Mugen Train, on track to despair.
Inglourious Basterds In Nazi-occupied France during World War II, a plan to assassinate Nazi leaders by a group of Jewish U.S. soldiers coincides with a theatre owner’s vengeful plans for the same.
Toy Story A cowboy doll is profoundly threatened and jealous when a new spaceman figure supplants him as top toy in a boy’s room.
Aliens Fifty-seven years after surviving an apocalyptic attack aboard her space vessel by merciless space creatures, Officer Ripley awakens from hyper-sleep and tries to warn anyone who will listen about the predators.
Star Wars: Episode VI - Return of the Jedi After a daring mission to rescue Han Solo from Jabba the Hutt, the Rebels dispatch to Endor to destroy the second Death Star. Meanwhile, Luke struggles to help Darth Vader back from the dark side without falling into the Emperor’s trap.
Das Boot The claustrophobic world of a WWII German U-boat; boredom, filth and sheer terror.
Dersu Uzala The Russian army sends an explorer on an expedition to the snowy Siberian wilderness where he makes friends with a seasoned local hunter.
2001: A Space Odyssey The Monoliths push humanity to reach for the stars; after their discovery in Africa generations ago, the mysterious objects lead mankind on an awesome journey to Jupiter, with the help of H.A.L. 9000: the world’s greatest supercomputer.
Lawrence of Arabia The story of T.E. Lawrence, the English officer who successfully united and led the diverse, often warring, Arab tribes during World War I in order to fight the Turks.
North by Northwest A New York City advertising executive goes on the run after being mistaken for a government agent by a group of foreign spies, and falls for a woman whose loyalties he begins to doubt.
Klaus A simple act of kindness always sparks another, even in a frozen, faraway place. When Smeerensburg’s new postman, Jesper, befriends toymaker Klaus, their gifts melt an age-old feud and deliver a sleigh full of holiday traditions.
Queen A Delhi girl from a traditional family sets out on a solo honeymoon after her marriage gets cancelled.
Dune: Part One Feature adaptation of Frank Herbert’s science fiction novel, about the son of a noble family entrusted with the protection of the most valuable asset and most vital element in the galaxy.
Up 78-year-old Carl Fredricksen travels to Paradise Falls in his house equipped with balloons, inadvertently taking a young stowaway.
Toy Story 3 The toys are mistakenly delivered to a day-care center instead of the attic right before Andy leaves for college, and it’s up to Woody to convince the other toys that they weren’t abandoned and to return home.
Batman Begins After training with his mentor, Batman begins his fight to free crime-ridden Gotham City from corruption.
Hauru no ugoku shiro When an unconfident young woman is cursed with an old body by a spiteful witch, her only chance of breaking the spell lies with a self-indulgent yet insecure young wizard and his companions in his legged, walking castle.
Indiana Jones and the Last Crusade In 1938, after his father Professor Henry Jones, Sr. goes missing while pursuing the Holy Grail, Professor Henry “Indiana” Jones, Jr. finds himself up against Adolf Hitler’s Nazis again to stop them from obtaining its powers.
Sholay After his family is murdered by a notorious and ruthless bandit, a former police officer enlists the services of two outlaws to capture the bandit.
Monty Python and the Holy Grail King Arthur and his Knights of the Round Table embark on a surreal, low-budget search for the Holy Grail, encountering many, very silly obstacles.
The Great Escape Allied prisoners of war plan for several hundred of their number to escape from a German camp during World War II.
The Treasure of the Sierra Madre Two down-on-their-luck Americans searching for work in 1920s Mexico convince an old prospector to help them mine for gold in the Sierra Madre Mountains.
The Gold Rush A prospector goes to the Klondike during the 1890s gold rush in hopes of making his fortune, and is smitten with a girl he sees in a dance hall.
Soul After landing the gig of a lifetime, a New York jazz pianist suddenly finds himself trapped in a strange land between Earth and the afterlife.
The Grand Budapest Hotel A writer encounters the owner of an aging high-class hotel, who tells him of his early years serving as a lobby boy in the hotel’s glorious years under an exceptional concierge.
Inside Out After young Riley is uprooted from her Midwest life and moved to San Francisco, her emotions - Joy, Fear, Anger, Disgust and Sadness - conflict on how best to navigate a new city, house, and school.
Song of the Sea Ben, a young Irish boy, and his little sister Saoirse, a girl who can turn into a seal, go on an adventure to free the fairies and save the spirit world.
Mad Max: Fury Road In a post-apocalyptic wasteland, a woman rebels against a tyrannical ruler in search for her homeland with the aid of a group of female prisoners, a psychotic worshiper, and a drifter named Max.
Zack Snyder’s Justice League Determined to ensure Superman’s ultimate sacrifice was not in vain, Bruce Wayne aligns forces with Diana Prince with plans to recruit a team of metahumans to protect the world from an approaching threat of catastrophic proportions.
Harry Potter and the Deathly Hallows: Part 2 Harry, Ron, and Hermione search for Voldemort’s remaining Horcruxes in their effort to destroy the Dark Lord as the final battle rages on at Hogwarts.

V. Summarise()

this function will create a new data frame that will calculate the summary of the statistics.

For example, this dataset will summarise the average rating for the selected year.

moviesData5 <- movies %>% group_by(year) %>% summarise(rating = mean(as.double(rating)))
kable(moviesData5)
year rating
(1925) 8.200000
(1948) 8.200000
(1954) 8.600000
(1959) 8.300000
(1962) 8.300000
(1963) 8.200000
(1966) 8.800000
(1968) 8.300000
(1975) 8.233333
(1977) 8.600000
(1980) 8.700000
(1981) 8.350000
(1983) 8.300000
(1985) 8.500000
(1986) 8.300000
(1989) 8.200000
(1994) 8.500000
(1995) 8.300000
(1997) 8.400000
(2000) 8.500000
(2001) 8.700000
(2002) 8.700000
(2003) 8.900000
(2004) 8.200000
(2005) 8.200000
(2008) 8.400000
(2009) 8.250000
(2010) 8.500000
(2011) 8.100000
(2013) 8.200000
(2014) 8.266667
(2015) 8.100000
(2018) 8.400000
(2019) 8.300000
(2020) 8.200000
(2021) 8.150000
(I) (2015) 8.100000
(I) (2017) 8.400000