I want to make ellipse in R. The code is given below:
library(car)
A <- matrix(c(2.2, 0.4, 0.4, 2.8), nrow=2)
ellipse(c(0, 0), shape=A, radius=0.98, col="red", lty=2)
But this code produces the following error:
Error in plot.xy(xy.coords(x, y), type = type, ...) :
plot.new has not been called yet
How can I resolve this?