the subsets function is stuck

Hello,

I am working on a simple project and using the bestsubsets function, and the subsets function to get the different adjr2. However, the subsets function starts to run and it is stucked. What is supposed to do after running the subsets function? I see the plot on the right side but nothing appears.

This is an example code:

install.packages("leaps")
install.packages("car")
library(leaps)
library(car)
data("mtcars")

bestsubsets = regsubsets(mpg ~ hp + wt, data = mtcars, nbest = 1)
subsets <- subsets(bestsubsets, statistics = "adjr2")

The subsets function, which I have never used, has a legend argument that has the default value "interactive" . The plot may be waiting for you to click on it to set the legend position. Try running

tmp <- subsets(bestsubsets, statistic = "adjr2", legend = FALSE)