Select columns from a query and return a data frame
Arguments
- query
An acset_query object from From() or Where().
- ...
Character names of subparts to include as columns.
Value
A data frame with the selected columns.
Examples
sch <- BasicSchema(
obs = c("V"),
attrtypes = c("Name"),
attrs = list(attr_spec("name", "V", "Name"))
)
g <- ACSet(sch)
add_parts(g, "V", 3, name = c("Alice", "Bob", "Carol"))
#> [1] 1 2 3
From(g, "V") |> Select("name")
#> id name
#> 1 1 Alice
#> 2 2 Bob
#> 3 3 Carol