View source: R/yaml_read_informant.R
yaml_read_informant | R Documentation |
With yaml_read_informant()
we can read a pointblank YAML file that
describes table information (typically generated by the yaml_write()
function. What's returned is a new informant object with the information
intact. The informant object can be given more information through use of
the info_*()
functions.
yaml_read_informant(filename, path = NULL)
filename |
File name
The name of the YAML file that contains fields related to an informant. |
path |
File path
An optional path to the YAML file (combined with |
A ptblank_informant
object.
There's a YAML file available in the pointblank package that's called
"informant-small_table.yml"
. The path for it can be accessed through
system.file()
:
yml_file_path <- system.file( "yaml", "informant-small_table.yml", package = "pointblank" )
The YAML file can be read as an informant by using the
yaml_read_informant()
function.
informant <- yaml_read_informant(filename = yml_file_path) informant
As can be seen from the information report, the available table metadata was
restored and reported. If you expect metadata to change with time, it might
be beneficial to use incorporate()
to query the target table. Or, we can
perform this querying directly from the YAML file with
yaml_informant_incorporate()
.
11-3
Other pointblank YAML:
yaml_agent_interrogate()
,
yaml_agent_show_exprs()
,
yaml_agent_string()
,
yaml_exec()
,
yaml_informant_incorporate()
,
yaml_read_agent()
,
yaml_write()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.