EXAM CHECKPOINT~50 MIN10 QUESTIONS

Midterm 1 Checkpoint

ADAPTIVE FLASHCARDS
Flashcard Study Mode
Study this module with spaced repetition. Wrong answers come back weighted heavier.
EXAM CHECKPOINT
Midterm 1 Checkpoint
0/10
ANSWERED
Q1

What is the result of (height > 72) | (height + 6 < 70) when height = 60?

Q2

Consider: rent <- 1200; utilities_adj <- utilities + '10'. Assuming utilities is not defined, what happens when this code runs?

Q3

What is the result of 0 / 0 in R?

Q4

The following code produces an error on geom_smooth(). What is the fix?

states %>%
  ggplot() +
  geom_point(aes(x = Income, y = Illiteracy)) +
  geom_smooth()
Q5FILL IN

Fill in the correct geom to add a horizontal reference line at the mean duration:

ggplot(mendota, aes(x = year, y = duration)) +
  geom_point() +
  _____(yintercept = mean(mendota$duration), color = "red")
Q6FILL IN

Fill in the correct pivot function to go from WIDE format (one column per language) to LONG format (one row per student-language pair):

Language %>%
  select(Name, English:Spanish) %>%
  _____(English:Spanish, names_to = "Language", values_to = "Fluent")
Q7FILL IN

Complete the code to combine 'Hello' and 'World' into a single string with a space between them:

Q8

What does sum(c(TRUE, FALSE, TRUE, TRUE)) return?

Q9

You want to join the 'Major' and 'Language' tables so that ONLY the 15 students present in BOTH tables are in the result. Which join is correct?

Q10

What does class(TRUE) return?