Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Could you please show me how to do these questions? Question 21 1 pts Your client has just run sum(1 + NA) in the console

image text in transcribedimage text in transcribed

Could you please show me how to do these questions?

image text in transcribedimage text in transcribedimage text in transcribed
Question 21 1 pts Your client has just run sum(1 + NA) in the console and tells you he's getting an error message! He is upset and doesn't like error messages (to be fair, who does?). What should you tell him to calm his nerves? 0 He can't mix different types of data and should get rid ofthe 1+ and just run sum(NA) Q You should tell him that in fact, the console output, while odd looking, is not an error message (but tell him nicely). 0 You should tell him that if he puts 1 and NA both in quotation marks, he won't get any error. 0 There isn't anything you can tell your client to help him. He will always get error output. 0 None of the above. Question 27 1 pts Suppose UBC now approaches you as a client (your reputation has grown considerably!). The school has created a data frame called UBCstudents, consisting of 60,000 observations. These observations represent all current UBC students. The only variables in UBCstudents are: . An 8-digit number, stored as a character variable, called UBCJD - A variable for country of birth, stored as three-digit abbreviation (students come from 150 countries) called country . The year that the student is currently in (e.g., rst-year students are labeled as 1 and fourth-year students are labeled as 4) in a variable called year. This is stored as a double. . Finally, a logical variable called female which is equal to TRUE if the student is female, and FALSE if not. Assume that UBCJD uniquely identies each observation. In other words, there are no duplicated UBC_lD values in the data frame. Also, assume no missing values for any data anywhere in UBCstudents. Suppose you run the following code for the school: UBC_subset /o mutate(dummy = 1) %>% group_by( ) %>% summarise(total = sum(dummy)) Which of the following options, when put in the underlined portion of group_by() above, will result in the LARGEST number of observations in UBc_subset? 0 year 0 country 0 female 0 country, female 0 year, country 0 There is not enough information in the question to determine any of the choices listed above. Your client asks you another question about his dataset mission_impossible, with 100,000 observations, and his character variables x, y, and 2. He tells you he has run: sum(lis.na(mission_impossible$x)) What would be the most appropriate interpretation of the output on the console? Q It is an error because of the fact that x is a character variable (Q It is the number of missing observations of x in the mission_impossible dataset. 0 It is the number of nonmissing observations of x in the mission_impossible dataset. Q It is the number of total missing observations in the entire mission_impossible dataset. Q There is not enough information in the question to determine any of the choices listed above. O None of the above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Management Accounting Information for creating and managing value

Authors: Kim Langfield Smith, David Smith, Paul Andon, Ronald Hilton, Helen Thorne

8th edition

9781760420413 , 978-1760420406

More Books

Students also viewed these Accounting questions

Question

Discuss three applications of Skinners research.

Answered: 1 week ago

Question

Speak clearly and distinctly with moderate energy

Answered: 1 week ago

Question

Get married, do not wait for me

Answered: 1 week ago