Skip to contents

Create or Add Hierarchical Subject Values in Image Metadata

Usage

mm_create_hs(path, value = c(), intern = TRUE, quiet = TRUE, ...)

Arguments

path

A character vector specifying the full path of the image file.

value

named character vector specifying the new hierarchical subjects to add. Each value must have a parent specified as the name, e.g c("Species" = "Vulture").

intern

TRUE if output should be returned as a character vector.

quiet

Suppress output of the command itself.

...

additional arguments to be passed to system2()

Examples


# Image path
image_path <- file.path(system.file("img", package = "maimer"), "large.jpeg")

# Get Hierarchical Subject from the image - Before use mm_create_hs()
mm_get_hs(path = image_path) #==> NULL
#> [1] "Species|Vulture"

mm_create_hs(path = image_path, value = c("Species" = "Vulture"))
#> Warning: error in running command
#> [1] 

# Get Hierarchical Subject from the image - Before use mm_create_hs()
mm_get_hs(path = image_path) #==> "Species|Vulture"
#> [1] "Species|Vulture"