knitr::opts_chunk$set( comment = "##", tidy = FALSE, error = FALSE, fig.width = 8, fig.height = 8)
A modest goal would be to provide dependencies for packages on Github. So let's do just that first.
We can try to add versioned dependencies to this later.
This can be done with adding two extra fields to DESCRIPTION
,
Dependencies
and BuildDependencies
. We can write the new
package manager that recognizes these fields, and installs the
specified packages from Github, in a non-versioned way.
Dependencies can be specified in the npm.js
way. E.g.
hadley/httr#0.5
means a tag on Github. Non-Github repositories
can be specified as git://github.com/user/project.git#commit-ish
,
or any of the other supported git
protocols.
library()
, require()
and ::
and :::
to use dependencies.
This might not be possible.Dependencies
field to DESCRIPTION
. This includes the
versioned dependencies.Dependencies
is ignored by CRAN, so CRAN dependencies should be in the
usual Imports
field.NAMESPACE
is used by CRAN, so it should include whatever CRAN neeeds.package@version
.1.0.x
would
work.loadNamespace
calls handle versioned dependencies. One way would be to create the
whole DAG of packages that have to be loaded, and load then in
topological ordering, so that no recursive loadNamespace
call is
triggered at all.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.