port r62183,4 from trunk

git-svn-id: http://svn.r-project.org/R/branches/R-3-0-branch@62185 00db46b3-68df-0310-9c12-caf00c1e9a41
port r62186:7 from trunk

git-svn-id: http://svn.r-project.org/R/branches/R-3-0-branch@62188 00db46b3-68df-0310-9c12-caf00c1e9a41