powered by
List the components in one or more repos. See mighty_repo() for the component layout. Files starting with test- are not listed.
mighty_repo()
test-
list_components(repos, as = c("character", "list", "tibble"))
Depending on as:
as
"character": character vector of unique component names.
"character"
character
"list": list with one element per component, each a named list with id, title, description, type, origin, method, params, depends, outputs and code.
"list"
list
id
title
description
type
origin
method
params
depends
outputs
code
"tibble": tibble with one row per component and the same columns.
"tibble"
Where to look. One of:
character vector of repo specs. See mighty_repo().
A mighty_repo_class object.
mighty_repo_class
A list of repo specs or mighty_repo_class objects.
A mighty_repos() collection.
mighty_repos()
Character vectors and lists are converted once with mighty_repos().
Format to list the components in:
"character": component names (filenames without extension).
"list": metadata for each component.
"tibble": metadata for each component as a tibble. Requires the tibble and tidyr packages.
tibble
tidyr
When a component exists in several repos, the metadata is taken from the first repo, as in find_component().
find_component()
get_component(), find_component()
get_component()
path <- system.file("examples", package = "mighty.component") list_components(path) list_components(path, as = "list") |> str(max.level = 2)
Run the code above in your browser using DataLab