Skip to contents

Schemas

Define the structure of your data

BasicSchema()
ACSet Schema
attr_spec()
Create an attribute specification
attrtypes()
Get attribute type names from a schema
codom()
Get the codomain of an arrow
dom()
Get the domain of an arrow
hom()
Create a morphism (foreign key) specification
homs()
Get morphisms (foreign keys) from a schema
objects()
Get object names from a schema
types()
Get all type names (objects and attribute types)

ACSets

Create and manipulate attributed C-sets

ACSet()
Attributed C-Set
acset()
Construct an ACSet using named arguments or NSE
acset_type()
Create an ACSet type bound to a specific schema
add_part()
Add a single part, optionally setting subparts
add_parts()
Add multiple parts at once
set_subpart()
Set a single subpart value
set_subparts()
Set multiple subparts at once
clear_subpart()
Clear a subpart value
copy_acset()
Create a deep copy of an ACSet
disjoint_union()
Disjoint union of two ACSets with the same schema
gc_acset()
Garbage collection for BitSetParts (no-op for IntParts)
acset_equal()
Test structural equality of two ACSets

Queries

Query and filter ACSet data

From()
Start a query on an ACSet object type
Select()
Select columns from a query and return a data frame
Where()
Filter query results by a subpart value
arrows()
Get all arrows (morphisms and attributes) from a schema
attrs()
Get attribute specs from a schema
has_part()
Check if a part exists
has_subpart()
Check if a subpart (morphism/attribute) exists in the schema
incident()
Incident query: find parts whose subpart equals a given value
maxpart()
Maximum part ID for an object type
nparts()
Number of parts of a given object type
parts()
Get all part IDs for an object type
subpart()
Get subpart value(s)
tables()
Get all tables from an ACSet

Serialization

JSON import/export and data frames

generate_json_acset()
Generate JSON-compatible list from an ACSet
generate_json_schema()
Generate a JSON-compatible list from a schema
parse_json_acset()
Parse a JSON-compatible list into an ACSet
parse_json_schema()
Parse a JSON-compatible list into a BasicSchema
read_json_acset()
Read an ACSet from JSON file
write_json_acset()
Write an ACSet to JSON file
as_data_frame()
Convert ACSet object type to data.frame

Deletion

Remove parts with cascading

rem_part()
Remove a single part using pop-and-swap strategy
rem_parts()
Remove multiple parts (must be processed from largest to smallest)
cascading_rem_part()
Remove a part and cascade to dependent parts
cascading_rem_parts()
Remove multiple parts with cascading