R Programming Questions and Answers – Visualizing Data – 2

This set of R Programming Language Multiple Choice Questions & Answers (MCQs) focuses on “Visualizing Data – 2”.

1. Which of the following adds marginal sums to an existing table?
a) par()
b) prop.table()
c) addmargins()
d) quantile()
View Answer

Answer: b
Explanation: prop.table() computes proportions from a contingency table.

2. Which of the following lists names of variables in a data.frame?
a) quantile()
b) names()
c) barchart()
d) par()
View Answer

Answer: a
Explanation: names function is used to associate name with the value in the vector.

3. Which of the following is tool for chi-square distributions?
a) pchisq()
b) chisq()
c) pnorm
d) barchart()
View Answer

Answer: c
Explanation: pnorm() is tool for normal distributions.

advertisement
advertisement

4. Which of the following groups values of a variable into larger bins?
a) cut
b) col.max(x)
c) stem
d) which.max(x)
View Answer

Answer: a
Explanation: stem() is used to make a stemplot.

5. Which of the following determine the least-squares regression line?
a) histo()
b) lm
c) barlm()
d) col.max(x)
View Answer

Answer: b
Explanation: lm calls the lower level functions lm.fit.

Note: Join free Sanfoundry classes at Telegram or Youtube

6. Which of the following is tool for checking normality?
a) qqline()
b) qline()
c) anova()
d) lm()
View Answer

Answer: a
Explanation: qqnorm is another tool for checking normality.

7. Which of the following is lattice command for producing boxplots?
a) plot()
b) bwplot()
c) xyplot()
d) barlm()
View Answer

Answer: b
Explanation: The function bwplot() makes box-and-whisker plots for numerical variables.

advertisement

8. Which of the following compute analysis of variance table for fitted model?
a) ecdf()
b) cum()
c) anova()
d) bwplot()
View Answer

Answer: c
Explanation: ecdf() builds empirical cumulative distribution function.

9. Which of the following is used to find variance of all values?
a) var()
b) sd()
c) mean()
d) anova()
View Answer

Answer: a
Explanation: sd() is used to calculate standard deviation.

advertisement

10.The purpose of fisher.test() is _______ test for contingency table.
a) Chisq
b) Fisher
c) Prop
d) Stem
View Answer

Answer: b
Explanation: prop.test() is used to inference for 1 proportion using normal approx.

Sanfoundry Global Education & Learning Series – R Programming Language.

Here’s the list of Best Books in R Programming Language.

To practice all areas of R Programming Language, Here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.