How to plot a quadratic equation in R?

To plot a quadratic equation in R, you can use the plot() function. The syntax for this is plot(x, y, type="l", col="blue"), where x is the x-axis values, y is the y-axis values, type="l" specifies that the plot should be a line plot, and col="blue" specifies the color of the line. You can then use the equation of the quadratic equation to calculate the y-axis values for each x-axis value. For example, if the equation is y = x2 + 2x + 1, then the y-axis values for each x-axis value can be calculated as y = x2 + 2x + 1.