
1. What is R used for?
a) Web development
b) Data analysis
c) Mobile app development
d) Game development
Answer: b) Data analysis
2. What is the extension of R files?
a) .r
b) .py
c) .js
d) .html
Answer: a) .r
3. Which function is used to load a CSV file in R?
a) csv()
b) load()
c) read.csv()
d) read()
Answer: c) read.csv()
4. What does a data frame in R represent?
a) A table of data
b) A vector
c) A matrix
d) A list
Answer: a) A table of data
5. Which function is used to calculate the mean in R?
a) median()
b) mean()
c) min()
d) max()
Answer: b) mean()
6. What is the purpose of the ggplot2 package in R?
a) To import data
b) To analyze data
c) To visualize data
d) To clean data
Answer: c) To visualize data
7. Which of the following is not a data type in R?
a) Numeric
b) Character
c) Boolean
d) Integer
Answer: c) Boolean
8. Which function is used to create a new variable in R?
a) create()
b) add()
c) new()
d) mutate()
Answer: d) mutate()
9. What is the purpose of the dplyr package in R?
a) To manipulate data frames
b) To visualize data
c) To import data
d) To clean data
Answer: a) To manipulate data frames
10. Which function is used to rename columns in R?
a) names()
b) rename()
c) label()
d) title()
Answer: b) rename()
11. Which function is used to convert a character string to a date object in R?
a) to.date()
b) as.date()
c) strptime()
d) date()
Answer: c) strptime()
12. Which function is used to subset data in R based on a condition?
a) subset()
b) filter()
c) select()
d) arrange()
Answer: b) filter()
13. Which function is used to sort data in R?
a) arrange()
b) order()
c) sort()
d) rank()
Answer: a) arrange()
14. Which package is used for linear regression in R?
a) ggplot2
b) dplyr
c) tidyr
d) stats
Answer: d) stats
15. Which function is used to calculate the correlation between two variables in R?
a) cor()
b) cov()
c) sd()
d) var()
Answer: a) cor()
16. Which function is used to create histograms in R?
a) hist()
b) barplot()
c) dotchart()
d) boxplot()
Answer: a) hist()
17. What is the purpose of the lubridate package in R?
a) To manipulate dates and times
b) To clean data
c) To import data
d) To visualize data
Answer: a) To manipulate dates and times
18. Which function is used to merge two data frames in R?
a) join()
b) merge()
c) append()
d) concat()
Answer: b) merge()
19. Which function is used to calculate the standard error in R?
a) sd()
b) se()
c) stderr()
d) stdev()
Answer: c) stderr()
20. Which function is used to create scatterplots in R?
a) scatterplot()
b) plot()
c) scatter()
d) scatterplotmatrix()
Answer: b) plot()
21. Which function is used to calculate the variance in R?
a) sd()
b) se()
c) stderr()
d) var()
Answer: d) var()
22. Which package is used for time series analysis in R?
a) ggplot2
b) dplyr
c) lubridate
d) forecast
Answer: d) forecast
23. Which function is used to calculate the standard deviation in R?
a) sd()
b) se()
c) stderr()
d) stdev()
Answer: a) sd()
24. Which function is used to create boxplots in R?
a) hist()
b) boxplot()
c) barplot()
d) scatterplot()
Answer: b) boxplot()
25. What is the purpose of the tidyr package in R?
a) To manipulate data frames
b) To visualize data
c) To import data
d) To clean data
Answer: d) To clean data
26. Which function is used to calculate the mode in R?
a) mean()
b) median()
c) mode()
d) max()
Answer: c) mode()
27. Which function is used to create a scatterplot matrix in R?
a) scatterplotmatrix()
b) pairs()
c) plotmatrix()
d) scatterplot()
Answer: b) pairs()
28. Which function is used to calculate the confidence interval in R?
a) ci()
b) confidence()
c) confint()
d) interval()
Answer: c) confint()
29. Which package is used for data manipulation in R?
a) ggplot2
b) dplyr
c) tidyr
d) reshape2
Answer: b) dplyr
30. Which function is used to calculate the coefficient of determination in R?
a) r()
b) c()
c) cd()
d) cor()
Answer: d) cor()
31. What is the purpose of the reshape2 package in R?
a) To manipulate data frames
b) To visualize data
c) To import data
d) To clean data
Answer: a) To manipulate data frames
32. Which function is used to calculate the skewness in R?
a) skew()
b) skewness()
c) kurt()
d) kurtosis()
Answer: b) skewness()
33. Which package is used for data visualization in R?
a) ggplot2
b) dplyr
c) tidyr
d) reshape2
Answer: a) ggplot2
34. Which function is used to calculate the kurtosis in R?
a) skew()
b) skewness()
c) kurt()
d) kurtosis()
Answer: d) kurtosis()
35. Which function is used to create density plots in R?
a) hist()
b) plot()
c) density()
d) boxplot()
Answer: c) density()
36. What is the purpose of the readr package in R?
a) To manipulate data frames
b) To visualize data
c) To import data
d) To clean data
Answer: c) To import data
37. Which function is used to calculate the chi-squared test in R?
a) chisq.test()
b) chi()
c) chi2()
d) chi.squared()
Answer: a) chisq.test()
38. Which package is used for data reshaping in R?
a) ggplot2
b) dplyr
c) tidyr
d) reshape2
Answer: c) tidyr
39. Which function is used to calculate the t-test in R?
a) t.test()
b) t()
c) ttest()
d) test()
Answer: a) t.test()
40. Which function is used to calculate the ANOVA in R?
a) aov()
b) anova()
c) analysis()
d) test()
Answer: a) aov()
41. Which function is used to calculate the Mann-Whitney U test in R?
a) wilcox.test()
b) mann-whitney()
c) mwu.test()
d) test()
Answer: a) wilcox.test()
42. Which package is used for statistical modeling in R?
a) ggplot2
b) dplyr
c) tidyr
d) statsmodels
Answer: d) statsmodels
43. Which function is used to calculate the chi-squared goodness of fit test in R?
a) chisq.test()
b) chi()
c) chi2()
d) chi.squared()
Answer: a) chisq.test()
44. Which function is used to calculate the Pearson correlation test in R?
a) pearson.test()
b) corr.test()
c) p.test()
d) test()
Answer: b) corr.test()
45. Which package is used for machine learning in R?
a) ggplot2
b) dplyr
c) tidyr
d) caret
Answer: d) caret
46. Which function is used to calculate the Wilcoxon rank sum test in R?
a) wilcox.test()
b) ranksum()
c) wrs.test()
d) test()
Answer: a) wilcox.test()
47. Which function is used to calculate the Kruskal-Wallis test in R?
a) kruskal.test()
b) kruskal()
c) kw.test()
d) test()
Answer: a) kruskal.test()
48. Which package is used for time series forecasting in R?
a) ggplot2
b) dplyr
c) forecast
d) stats
Answer: c) forecast
49. Which function is used to calculate the logistic regression in R?
a) glm()
b) lm()
c) logit()
d) regression()
Answer: a) glm()
50. Which package is used for data clustering in R?
a) ggplot2
b) dplyr
c) tidyr
d) cluster
Answer: d) cluster
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023