Skip to contents

Removes a Data Resource from a Data Package, i.e. it removes one of the described resources.

Usage

remove_resource(package, resource_name)

Arguments

package

Data Package object, as returned by read_package() or create_package().

resource_name

Name of the Data Resource.

Value

package with one fewer resource.

See also

Other edit functions: add_resource()

Examples

# Load the example Data Package
package <- example_package()

# List the resources
resources(package)
#> [1] "deployments"  "observations" "media"       

# Remove the resource "observations"
package <- remove_resource(package, "observations")

# List the resources ("observations" removed)
resources(package)
#> [1] "deployments" "media"