Skip to content

Preview Metadata

The preview_metadata() function in the reportifyr package provides a summary of reportifyr metadata for a specific file (file_name) from its associated file directory.


preview_metadata()

R: Previews a single metadata file for an object
preview_metadataR Documentation

Description

Previews a single metadata file for an object

Usage

preview_metadata(file_name)

Arguments

file_name

The file path of the file whose metadata you want to preview.

Value

A single row data frame consisting of metadata type and footnotes for the object supplied

Examples

## Not run: 
figures_path <- here::here("OUTPUTS", "figures")
plot_file_name <- "myplot.png"
preview_metadata(file.path(figures_path, plot_file_name))

## End(Not run)

Returns

A data frame summarizing metadata for the specified file_name.


Logging

  • Debug: Logs the start and end of the function, metadata generation for the directory, and filtering for the file_name.
  • Info: Logs the discovery of the file_name, its directory, and the successful filtering of metadata.
  • Error: Logs an error if the specified file_name does not exist.

Additional Resources

  • reportifyr GitHub: Refer to the reportifyr repository for more details.
  • JSON Documentation: Learn more about JSON structure and syntax here.
  • Preview Metadata Files Reference: Refer to the reference on preview_metadata_files() here.