Skip to contents

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)



File name

scalar<character> // required

The name of the YAML file that contains fields related to an informant.


File path

scalar<character> // default: NULL (optional)

An optional path to the YAML file (combined with filename).


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 <- 
    "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)


This image was generated from the third code example in the `yaml_write()` help file.

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.

Function ID