- What is the primary purpose of the
curve() function in R?
- Which argument in the
curve() function is used to specify the mathematical expression to plot?
- How do you specify the range of x-values for a plot created using
curve()?
- What type of object can be passed as the
expr argument in curve()?
- Which of the following commands correctly plots the sine function from \(-\pi\) to \(\pi\) using
curve()?
- How can you change the line color in a plot generated by
curve()?
- Which argument in
curve() would you use to change the number of points plotted on the curve?
- How can you add a title to the plot created by
curve()?
- What happens if you set the
add = TRUE argument in curve()?
- Which of the following would plot the function
y = x^2 from -5 to 5?
- What does the
add = TRUE argument do in the curve() function?
- What is the default type of plot produced by the
curve() function in R?
- If you want to plot a curve from
x = -10 to x = 10 with 200 points, what would you do?
- To plot the function
y = sqrt(x) for values of x from 0 to 25, what would you use?
- How can you plot multiple mathematical expressions on the same graph using
curve()?
- Which argument in
curve() allows you to customize the line type of the curve?
- How would you add labels to the x-axis and y-axis while using
curve()?
- Which of the following is a correct way to plot a quadratic function
y = x^2 from -3 to 3 using curve()?
- What will the following command do?
curve(sin(x), from = 0, to = 2*pi, col = "red", lty = 2)
- How would you display a curve with a log-scaled y-axis using
curve()?