The leaps package in R will automatically rearrange variables when it detects a linear dependency between variables. This is causing coef and plot to fail. Below is an example of the warning that occurs when collinear variables are present:
Reordering variables and trying again: Warning message: In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in, : 6 linear dependencies found
However, there is a bug in the package that the functions that depend on the resulting object are incorrect. Some of the resulting functions (e.g., "coef()" and "plot() ) do not recognize that the positions of the various x variables have changed. As a result they do not select the correct variables into the "best" models.
I expected the models in plot(rg1) and coef(rg1,1:10) to be the "best" models, but instead the models are based on the original variable order. Using actual column names instead of their numerical reference inside leaps would conceivably fix this problem.