Description Usage Arguments See Also Examples
New properties are added and existing properties are replaced (or deleted if NULL
). If set, properties override the defaults returned by get_resource
.
1 2 3 4 | set_resource(.data, name, path, profile, title, description, format, mediatype,
encoding, schema, bytes, hash, sources, licenses, ...)
set_resource(.data) <- value
|
.data |
Object to modify (typically a data.frame). |
name |
(character) Resource name. |
path |
(character) URLs or paths relative to the data package directory (see data-resource/path-data-in-files). |
profile |
(character) Custom resource profile (see https://specs.frictionlessdata.io/profiles/). |
title |
(character) Human-readable title. |
description |
(character) Human-readable description. |
format |
(character) Output format (e.g. "csv", "json"). |
mediatype |
(character) Mediatype/mimetype of the output (e.g. "text/csv", "application/json"). |
encoding |
(character) Character encoding of the output (see http://www.iana.org/assignments/character-sets/character-sets.xhtml). |
schema |
(named list) See |
bytes |
(integer) Size of the output file in bytes. |
hash |
(character) MD5 hash of the output file. |
sources |
(list) See |
licenses |
(list) See |
... |
(name = value) Additional properties. |
value |
(named list) Resource metadata (typically a call to |
Other resource functions: get_package
,
get_resource
, resource
,
set_resources
1 2 3 4 5 6 7 8 9 | x <- set_resource(
data.frame(id = 1L, value = 1.1),
title = "Example data",
path = "data/example.csv"
)
get_resource(x)
x <- data.frame(id = 1L, value = 1.1)
set_resource(x) <- resource(title = "Example data", path = "data/example.csv")
get_resource(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.