How can I create a plot with different facet based on each column but still the same value of x base on the row names.
Let's say I have a summary from regsubsets() but since it returns a list I have to make it as a data frame first (is there anyway I can use ggplot2 with list?).
set.seed(1)
X = rnorm(100)
e = rnorm(100)
Y = 8 + 7*X + 2.5*X^2 - 9*X^3 + e
regfit.full = regsubsets(Y~poly(X,10,raw=T), data=data.all, nvmax=10)
(reg.summary = summary(regfit.full))
df = data.frame(reg.summary$cp, reg.summary$bic, reg.summary$adjr2)
> names(df)
[1] "reg.summary.cp" "reg.summary.bic" "reg.summary.adjr2"
> dim(df)
[1] 10 3
Now the question is how can I make a facet for each features (i.e. reg.summary.cp, reg.summary.bic, reg.summary.adjr2) that will be the value on the y-axis and the value for the x-axis will be the row number.

