21. How do you create a kernel density plot in R for a numeric variable values? A. plot_kernel_density(values) B. geom_density(mapping = aes(x = values)) C. density_plot(values, kernel = TRUE) D. kde(values) Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
22. What is the purpose of the barplot() function in R? A. Creates a bar plot for a categorical variable B. Generates random bars in a plot C. Plots a probability distribution function D. Computes the mean and standard deviation of a variable Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
23. How do you generate random numbers from a Poisson distribution in R with parameter lambda? A. rpois(lambda) B. poisson_random(lambda) C. random_poisson(lambda) D. generate_poisson(lambda) Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
24. In R, what does the plot() function do when applied to a linear regression model? A. Plots the residuals against the fitted values B. Creates a scatter plot of the model predictions C. Plots the model coefficients D. Generates a summary plot for the model Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
25. How do you calculate the mode of a numeric variable named variable in R? A. mode(variable) B. calculate_mode(variable) C. modal_value(variable) D. compute(variable, "mode") Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
26. What is the role of the layout() function in R graphics? A. Organizes multiple plots in a grid layout B. Adjusts the layout of the main plot and legend C. Defines the layout of a specific layer in a plot D. Creates a layout for a Shiny web application Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
27. In R, what does the polygon() function do when used in a plot? A. Draws a polygon on the plot B. Adds a polygonal shape to the legend C. Connects data points with straight lines D. Fills the plot background with a polygonal shape Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
28. How do you create a stem-and-leaf plot for a numeric variable values in R? A. stemleaf(values) B. create_stemleaf(values) C. geom_stemleaf(mapping = aes(x = values)) D. plot_stemleaf(values) Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
29. What is the purpose of the pairs() function in R? A. Creates scatter plots for all pairs of numeric variables B. Generates pairwise scatter plots and correlations C. Plots a matrix of bivariate scatter plots D. Adds pairs of points to an existing plot Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
30. How do you create a time series plot in R for a numeric variable values with corresponding time points time? A. time_series(values ~ time) B. plot_time_series(values, time) C. geom_line(mapping = aes(x = time, y = values)) D. tsplot(values, time) Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board