JavaScript isn't enabled in your browser, so this file can't be opened. Enable and reload.
Quiz Tutorial 4: Data Analysis with dplyr
This quiz complements Tutorial 4: Data Analysis with dplyr. It is only for your own self-assessment so you are free to submit as many times as you want.
Link to tutorial:
https://www.kaggle.com/christyqu/tutorial-4-data-analysis-with-dplyr
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Q1: What package does the function nhanes() belong to?
*
1 point
nhanesA
dplyr
tidyr
plyr
Q2: Which code below is the correct one to print the last 10 rows of a dataframe called temp?
*
1 point
head(temp)
head(temp,10)
tail(temp)
tail(temp,10)
Q3: Suppose a cell contains NA. What is the output after perform
is.na
() on it?
*
1 point
a real number
NA
True
False
Q4: Given the following code: select(dataset,A,B) What is the purpose of the code?
*
1 point
only show column A from the dataset
rename column B to A
rename column A to B
only show column A and B from the dataset
Q5: Which code below is the correct one to rename column A to B in a dataframe called dataset?
*
1 point
select(dataset, A = B)
select(dataset, B = A)
rename(dataset, A = B)
rename(dataset, B = A))
Q6: Fill in the blank to answer the first question in 'Try it yourself': filter(finaldemo, gender `__`)
*
1 point
= Male
== Male
= 'Male'
== 'Male'
Q7: Fill in the blank to answer the second question in 'Try it yourself':filter(finaldemo, gender == 'Male' `__` age > 50)
*
1 point
|
&
||
&&
Q8: Fill in the blank to answer the third question in 'Try it yourself':filter(finaldemo, `__`)
*
1 point
edu = NA
edu == NA
is.na
(edu)
!
is.na
(edu)
Q9: Fill in the blank to answer the question in 'Try it yourself': `___` (finalbpx,`__`)
*
1 point
select, bpt_sec
select, desc(bpt_sec)
arrange, bpt_sec
arrange, desc(bpt_sec)
Q10: Fill in the blank to answer both parts of the 'Try it yourself' sections. ___(final_bpx,rescale_pulse = pulse/2,rescale_bpt_sec = bpt_sec/60)
*
1 point
mutate,mutate
mutate,transmute
transmute,mutate
transmute,transmute
Q11: Fill in the blanks to answer the question in 'Try it yourself': by_edu <- groupby(`__`) summarize(___, averageage = `__`(age, na.rm = TRUE))
*
1 point
edu,final_demo; final_demo; mean
final_demo,edu; edu; avg
final_demo,edu; by_edu; mean
edu,final_demo; by_edu; avg
Q12: Fill in the blanks to answer the first question in 'Try it yourself': by_gender <-group_by(final_demo,gender) filter(byedu,`__`)
*
1 point
n() > 3
n(final_demo) > 3
n(gender) > 3
n(age) > 3
Q13: Fill in the blanks to answer the second question in 'Try it yourself':by_edu <-group_by(final_demo,edu) mutate(byedu, `__`)
*
1 point
diff_age = age - avg_age
diff_age = mean(age, na.rm = T)
diff_age = diff(age)
diff_age = age - mean(age, na.rm = T)
Q14: Fill in the blanks to answer the question in 'Try it yourself':___ %>% filter(___,systolic > 120) %>% mutate(___,bpt_min = bpt_sec/60)
*
1 point
temp; final_bpx; final_bpx
temp; BLANK; BLANK
final_bpx; final_bpx; final_bpx
final_bpx; BLANK; BLANK
Submit
Clear form
This content is neither created nor endorsed by Google.
Report Abuse
-
Terms of Service
-
Privacy Policy
Forms