BG 11

pdf

School

University of the Fraser Valley *

*We aren’t endorsed by this school

Course

205

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

3

Uploaded by JudgeOxidePorpoise6

Report
11/22/23, 2:06 PM Quiz: Breakout Group (BG) 11 https://canvas.ubc.ca/courses/123136/quizzes/656293/take 1/3 Breakout Group (BG) 11 Started: Nov 22 at 2:06p.m. Quiz Instructions Please submit your answers by 11 pm tonight. Every student should submit their own answers. In this BG, we are going to use nba_players_19 dataset from openintro package/library. If you have not installed openintro package, do so as follows: install.packages("openintro") If already installed, please load the library library(openintro) You can explore nba_players_19 data frame. The data frame contains summary information from the NBA players for the 2018-2019 season. The data frame is with 494 observations on 7 variables. View(nba_players_19) Don't forget to load tidyverse as the code below uses pipe operator from magrittr package. library(tidyverse) If you cannot install openintro for some reason, you can still access the data. Please follow the alternative approach (https://canvas.ubc.ca/courses/123136/pages/alternative-access-to-data-used-in-the-bg- exercises) . 5 pts Question 1
11/22/23, 2:06 PM Quiz: Breakout Group (BG) 11 https://canvas.ubc.ca/courses/123136/quizzes/656293/take 2/3 You are asked to find the average height of Raptors' players who are playing in Forward positions. Some parts of the code which answers the question are redacted. nba_players_19 %>% __ A __(team == "Raptors", position == "Forward") %>% ___ B ___(average_height = ___ C ___ ( ___ D ___ )) Once you the above code is executed, you are given the following output in the console. # A tibble 1 x 1 average_height <dbl> 1 80.5 Please complete the code by filling out the corresponding blanks below. You can only use a function name or a column name in each blank. Don't leave any space. __ A __ is __ B __ is __ C __ is __ D __ is 5 pts Question 2 You are asked to find the player(s) who are the tallest in 2018-2019 season. Along with the first name and last name, you are ask to report the team and the height. Some parts of the code which answers the question are redacted. nba_players_19 %>% ___ X ___ (height == ____ Y ___ (height)) %>% ___ Z ___ (first_name, last_name, team, height)
11/22/23, 2:06 PM Quiz: Breakout Group (BG) 11 https://canvas.ubc.ca/courses/123136/quizzes/656293/take 3/3 Not saved Once you executed the code, the following output was returned in the console. # A tibble: 2 × 4 first_name last_name team height <chr> <chr> <chr> <dbl> 1 Boban Marjanovic Clippers 87 2 Kristaps Porzingis Knicks 87 Please complete the code by filling out the corresponding blanks below. You can only use a function name in each blank. Don't leave any space. ___ X ___ is ___ Y ___ is ___ Z ___ is Submit Quiz
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help