How can I get a full URL for anything on CRAN? Using Safari, Google Chrome, and Firefox under OS X 10.11.2, I select a CRAN mirror from "www.r-project.org" and get a URL like "https://cran.rstudio.com/". Then I select "packages" and get a different web page, but the URL displayed doesn't change. I'd like to access the full URL of a vignette in a package, but modern web browsers hide that detail. Thanks, Spencer Graves
Hi Spencer, The reason is because the R website is doing frame forwarding rather than URL forwarding. You'll need to right-click on the Packages and open it into a new window for the address bar to reflect the change. In any case the following link will change accordingly: https://cran.rstudio.com/web/packages/ If you really want to know what is happening then below is the difference: For frame forwarding it will look like this: <FRAME src="navbar.html" name="contents" frameborder=0> While for URL forwarding it will look like this: <a href="web/packages/" target="banner">Packages</a><br> Hope it helps, ~p -----Original Message----- From: R-devel [mailto:r-devel-bounces at r-project.org] On Behalf Of Spencer Graves Sent: Saturday, January 23, 2016 9:28 PM To: r-devel at r-project.org Subject: [Rd] URL for a vignette on CRAN? How can I get a full URL for anything on CRAN? Using Safari, Google Chrome, and Firefox under OS X 10.11.2, I select a CRAN mirror from "www.r-project.org" and get a URL like "https://cran.rstudio.com/". Then I select "packages" and get a different web page, but the URL displayed doesn't change. I'd like to access the full URL of a vignette in a package, but modern web browsers hide that detail. Thanks, Spencer Graves ______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Spencer, On 23 January 2016 at 20:27, Spencer Graves wrote: | How can I get a full URL for anything on CRAN? | | Using Safari, Google Chrome, and Firefox under OS X 10.11.2, I | select a CRAN mirror from "www.r-project.org" and get a URL like | "https://cran.rstudio.com/". Then I select "packages" and get a | different web page, but the URL displayed doesn't change. I'd like to | access the full URL of a vignette in a package, but modern web browsers | hide that detail. 1) All CRAN mirrors use the same layout. 2) Using a CDN such as cran.rstudio.com, or now the equivalent cloud.r-project.org is 'A Good Thing (TM)' because the resulting location will almost always be close to any reader -- as it adapts based on the reader location. See Wikipedia on 'Content Deliver Networks' for more details. 3) http://cloud.r-project.org/package=sos is preferred for any pkg, here your sos package 4) It flattens to https://cloud.r-project.org/web/packages/sos/index.html 5) You can derive the vignette from that page or just construct it: https://cloud.r-project.org/web/packages/sos/vignettes/sos.pdf This is of the form ${SERVER}/web/packages/${PACKAGE}/${VIGNETTE} I have been using url such as the one in 5) for a long while. Works like a charm. Now, from your vague text above, maybe you prefer NOT to use a CDN. In that case, insert an _explicit_ server, say Berkeley's mirror and you get https://cran.cnr.berkeley.edu/web/packages/sos/vignettes/sos.pdf but that is _still_ of the form ${SERVER}/web/packages/${PACKAGE}/${VIGNETTE} yet simple uses a different value for ${SERVER}. Makes sense? Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Thanks to both Paul Grosu and Dirk Eddelbuettel for informative and useful replies. Spencer On 1/23/2016 8:58 PM, Dirk Eddelbuettel wrote:> Spencer, > > On 23 January 2016 at 20:27, Spencer Graves wrote: > | How can I get a full URL for anything on CRAN? > | > | Using Safari, Google Chrome, and Firefox under OS X 10.11.2, I > | select a CRAN mirror from "www.r-project.org" and get a URL like > | "https://cran.rstudio.com/". Then I select "packages" and get a > | different web page, but the URL displayed doesn't change. I'd like to > | access the full URL of a vignette in a package, but modern web browsers > | hide that detail. > > 1) All CRAN mirrors use the same layout. > > 2) Using a CDN such as cran.rstudio.com, or now the equivalent > cloud.r-project.org is 'A Good Thing (TM)' because the resulting location > will almost always be close to any reader -- as it adapts based on the > reader location. See Wikipedia on 'Content Deliver Networks' for more details. > > 3) http://cloud.r-project.org/package=sos is preferred for any pkg, here > your sos package > > 4) It flattens to https://cloud.r-project.org/web/packages/sos/index.html > > 5) You can derive the vignette from that page or just construct it: > https://cloud.r-project.org/web/packages/sos/vignettes/sos.pdf > This is of the form ${SERVER}/web/packages/${PACKAGE}/${VIGNETTE} > > I have been using url such as the one in 5) for a long while. Works like a charm. > > Now, from your vague text above, maybe you prefer NOT to use a CDN. In that > case, insert an _explicit_ server, say Berkeley's mirror and you get > https://cran.cnr.berkeley.edu/web/packages/sos/vignettes/sos.pdf > but that is _still_ of the form ${SERVER}/web/packages/${PACKAGE}/${VIGNETTE} > yet simple uses a different value for ${SERVER}. > > Makes sense? > > Dirk >