Some time ago, I inquired about adding a secondary transformed x-axis in ggplot, and Nate Pope provided the excellent solution described at ggplot2: Adding secondary transfo
After some thought, I've confirmed that issue #1 originates from changes to recent versions of ggplot2, and I've also come up with a temporary workaround - installing an old version of ggplot2.
Following Installing older version of R package to install ggplot2 1.0.0, I installed ggplot2 1.0.0 using
packageurl <- "http://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_1.0.0.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
which I verified with
packageDescription("ggplot2")$Version
Then, re-running the exact code posted above, I was able to produce a plot with the added x-axis correctly displayed:
This is obviously not a very satisfying answer, but it at least works until someone smarter than I can explain why this approach doesn't work in recent versions of ggplot2. :)
So issue #1 from above has been resolved. I'm still haven't resolved issue #2 from above, so would appreciate any insight on that.