Read an individual icon
read_icon(x)An icons vector: an SVG icon that can be printed, embedded
in R Markdown, or styled with icon_style(). If x is a file path, it
is retained and can be retrieved with icon_path().
path <- tempfile(fileext = ".svg")
writeLines(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0"/></svg>',
path
)
read_icon(path)
#> <icons[1]>
#> [1] <icon:file19a651e054b>