[Rd] URL for a vignette on CRAN?

Dirk Eddelbuettel edd at debian.org
Sun Jan 24 03:58:33 CET 2016


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:
    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
but that is _still_ of the form ${SERVER}/web/packages/${PACKAGE}/${VIGNETTE}
yet simple uses a different value for ${SERVER}.

Makes sense?


http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the R-devel mailing list