The multi_resource
can be used to permit sourcing package information
from multiple resources.
Usage
multi_resource(
package = NA_character_,
version = NA_character_,
id = next_id(),
md5 = NA_character_,
resources = list()
)
Arguments
- package
character(1L)
Package name. Optional, but should be provided if possible.- version
character(1L)
Package version, provided as a string.- id
integer(1L)
optional id used for tracking resources throughout execution. Generally not provided directly, as new objects automatically get a unique identifier. For example, the package source code from arepo_resource()
may be downloaded to add asource_archive_resource()
and add it to a newmulti_resource()
. Because all of these represent the same package, they retain the sameid
. Primarily theid
is used for isolating temporary files.- md5
character(1L)
md5 digest of the package source code tarball. This is not generally provided directly, but is instead derived when acquiring resources.- resources
list
ofresource
s
Details
Most prominently, these are exposed when a pkg()
is assumed from a
character value. With only a package name, val.meter
will search for
resources from acceptable sources according to your policy
. If
more than one acceptable resource is discovered, they are combined into
a multi_resource
.
During data derivation, each of the bundled resources is used to attempt to derive package data. The package only raises an error when no resource can successfully derive the expected data.
See also
Other resources:
cran_repo_resource()
,
git_resource()
,
install_resource()
,
local_resource()
,
local_source_resource()
,
mock_resource()
,
remote_resource()
,
repo_resource()
,
resource()
,
source_archive_resource()
,
source_code_resource()
,
unknown_resource()