View source: R/yaml_read_informant.R
yaml_informant_incorporate | R Documentation |
incorporate()
The yaml_informant_incorporate()
function operates much like the
yaml_read_informant()
function (reading a pointblank YAML file and
generating an informant with all information in place). The key difference
is that this function takes things a step further and incorporates aspects
from the the target table (defined by table-prep formula that is required in
the YAML file). The additional auto-invocation of incorporate()
uses the
default options of that function. As with yaml_read_informant()
the
informant is returned except, this time, it has been updated with the latest
information from the target table.
yaml_informant_incorporate(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_informant_incorporate()
function. If you expect metadata to change
with time, it's best to use yaml_informant_incorporate()
instead of
yaml_read_informant()
since the former will go the extra mile and perform
incorporate()
in addition to the reading.
informant <- yaml_informant_incorporate(filename = yml_file_path) informant
As can be seen from the information report, the available table metadata was restored and reported. If the metadata were to change with time, that would be updated as well.
11-7
Other pointblank YAML:
yaml_agent_interrogate()
,
yaml_agent_show_exprs()
,
yaml_agent_string()
,
yaml_exec()
,
yaml_read_agent()
,
yaml_read_informant()
,
yaml_write()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.