R `lm`, Could anyone give me an example of the misleading case on "prediction from a rank-deficient"? Could anyone give an example of "prediction from a rank-deficient fit may be misleading"? 
From following example, it seems fine.
fit1=lm(mpg~wt,data=mtcars)
fit2=lm(mpg~wt+I(2*wt)+I(3*wt),data=mtcars)
all(predict(fit1,mtcars)==predict(fit2,mtcars))

Why and when "misleading" will happen?
 A: Ok, say you want to predict someones weight based on their height and chest size. For simplicity assume we have a training set of 3 people: $p_1$, $p_2$ and $p_3$. Now our data is:
Chest size: $p_1=80cm, p_2=90cm, p_3=100cm$
Height: $p_1=160cm, p_2=180cm, p_3=200cm$
weight: $p_1=59kg, p_2=68kg, p_3=76kg$ 
Note: height equals exactly 2 times the chest size in each training case.
Now we run a linear regression on this. A result you might get is:
$0.75 \cdot \text{Chest size} + 0 \cdot \text{height}$
Another result you could get is:
$0 \cdot \text{Chest size} + 0.375 \cdot \text{height}$
More concerning, you also could get:
$3000.75 \cdot \text{Chest size} - 1500 \cdot \text{height}$ 
All these give exactly the same result, so the cost-function doesn't care which one of these it finds. However now suppose you apply this to a new person, $p_4$, this person has as measurements:
$Chest size = 81cm$
$Height=160cm$
This is basically $p_1$, but 1cm more chest size. However if we use that third set of parameters we get:
$81\cdot 3000.75 - 160 \cdot 1500 = 3060.75kg$
This is obviously ridiculous, for some with the same height as $p_1$ but 1 cm more chest size, we shouldn't predict that person to be 3000kg heavier. So we can indeed conclude that these coefficients are obviously wrong. But how would our regression algorithm know that these coefficients are wrong? They give the same output, have the same cost as very reasonable coefficients.  
The underlying problem is that in our training-set, height and weight are linearly dependent. This allows for an infinite number of coefficient pairs, all with the same outpout in each training case. So the cost of each of that infinite number of coefficient pairs is the same. However as soon as an example comes along where those 2 parameters have a different relation, all those infinite pairs of coefficients suddenly have very different outputs on this new individual.
As we saw here, as soon as someone comes along that doesn't have a height:chest size relation of 2, we are lost. Then what appeared as very good parameter suddenly can predict crazy weights. However when we don't know our parameters are linearly dependent (it might be coincidence), we might not know that the possibility is there for such crazy scenario's. We might get weights like $(3000.75, -1500)$. Those weights are very misleading. That is what the function is warning for. Misleading weights like in this case $(3000.75, -1500)$.
A: Your second fit contains collinear factors. I know because you defined them that way! No two variables in a linear model can be "recreated" value-by-value using any linear combination of other variables in the model. Otherwise you arrive at rank deficiency. R is smart enough to just drop redundant factors, so it simply sets your second and third coefficients to missing in the second model.
When R does this, it assumes that you did not do so in such an obvious way. For instance, if you adjusted for 100 factors, you may arrive at deficiency and not know it. For that reason, when you predict, R reminds you that the prediction model is so overadjusted, there is almost certainly a problem of overfitting that will not give you reliable predictions. There are methods to accommodate high dimensional predictions.
Take this example of using n=50 observations to fit a 50 feature prediction model versus a 20 feature prediction model.
set.seed(1)

p <- 50
n <- 200

b <- matrix(rnorm(p))
x <- matrix(rbinom(p*n, 1, .3), n, p)
y <- rnorm(n, sweep(x, b, FUN=`*`, MARGIN = 2))
x <- as.data.frame(x)
X <- data.frame('y'=y, 'x'=x)
train <- rep.int(1:0, c(50, 150))==1

## all factors are "important", but fit2 with the first 20 preds more
## generalizable
fit1 <- lm(y ~ ., subset=train, data=X)
fit2 <- lm(y ~ ., subset=train, data=X[, 1:21])

pred1 <- predict(fit1, newdata = X[!train, ])
pred2 <- predict(fit2, newdata = X[!train, ])

var(y[!train] - pred1)
var(y[!train] - pred2)

results in
> var(y[!train] - pred1)
[1] 15.07587
> var(y[!train] - pred2)
[1] 1.610317

A: A rank-deficient fit happens because your $x$-variables (features) are linearly dependent. This essentially means that you have "more" $x$-variables than observations. This can happen for two reasons. Either you have too few observations, or too many $x$-variables.
As in your example, having too many $x$-variables is harmless when it comes to prediction, although it may cause you to get the wrong regression coefficients. But having too few observations, while it gives you the same error message, will be a much bigger problem, because it means that R will not be able to find the regression coefficients, even when the data are exactly fitted by a linear model.
Here is an example:
# the model is y = V1 + V2 + V3 + V4    

X <- matrix(rnorm(8*4), ncol=4)
y <- rowSums(X)
dat <- data.frame(cbind(X, y))

# case 1: not enough observations; everything goes wrong

model1 <- lm(y ~., data=dat[6:8,])
pred1 <- predict(model1, dat[1:5,])
mse1 <- sum((y[1:5] - pred1)^2)/5

# case 2: just right!

model2 <- lm(y ~., data=dat[1:5,])
pred2 <- predict(model2, dat[6:8,])
mse2 <- sum((y[6:8] - pred2)^2)/3

# case 3: too many features (like in your example) is still fine for 
# prediction, even though you get the same error message as case 1.

model3 <- lm(y ~. + I(2*V1), data=dat[1:5,])
pred3 <- predict(model3, dat[6:8,])
mse3 <- sum((y[6:8] - pred2)^2)/3

