What is the purpose of the density() function in R?
A. Computes the kernel density estimate of a numeric variable
B. Creates a density plot for a numeric variable
C. Calculates the probability density function of a variable
D. Applies a density transformation to a data frame
Answer: Option B
What function in R is used to generate random numbers from a standard normal distribution?
A. rnorm()
B. random_normal()
C. generate_normal()
D. random_numbers()
In R, how do you create a histogram for a numeric variable variable?
A. hist(variable)
B. create_histogram(variable)
C. geom_histogram(mapping = aes(x = variable))
D. plot_histogram(variable)
What does the qqnorm() function in R do?
A. Plots a quantile-quantile plot for normality assessment
B. Generates a random sample from a normal distribution
C. Creates a normal probability plot
D. Quantifies the normal distribution of a variable
How do you create a boxplot in R for a numerical variable named values?
A. boxplot(values)
B. plot_box(values)
C. geom_boxplot(mapping = aes(y = values))
D. create_boxplot(values)
Join The Discussion