Sheet structure¶
This page describes the common structure of actionsheets.
Most actionsheets describe how to create and manipulate a specific data type or object. For example, there are actionsheets about strings, lists, and data.frames.
Sheets are hierarchically structured using sections. The main sections are:
- Create
How to define, instantiate or create the data type, possibly from other types.
Examples: define a date, parse date from string, create set from a list of values - Test
Check or assess something about the object.
Examples: is it empty? does it contain a given value? - Extract
Get properties, attributes, or other information about the object of a different type than the object (typically scalars). Examples: length of a list, element value at a given index, max value among elements. - Derive / Update
Create a derived or altered object from the given object, preserving the object type, or update the object in-place / by-reference.
Examples: head of a list, slicing a string, selecting conditional rows from a data frame. - Convert
Export / represent the object as a different data type.
Examples: datetime as string, dictionary as list of key-value pairs, data frame as matrix.
Additional common categories, used when applicable:
- Constants: Available constants, defaults, or singleton
- Usage: Specific syntax, statements, or recommended patterns.
- Iterate: Operations that iterate or traverse through the object (its elements, keys, rows, nodes).
- Install: Installation instructions.
- Show: Ways to print or visualize the object in a human-readable way.
Create¶
How to define, instantiate or create the data type, possibly from other types.
Examples: define a date, parse date from string, create set from a list of values
Test¶
Check or assess something about the object.
Examples: is it empty? does it contain a given value?
Extract¶
Get properties, attributes, or other information about the object of a different type than the object (typically scalars). Examples: length of a list, element value at a given index, max value among elements.
Subcategories¶
- Properties
Operations which retrieve properties or attributes of the object.
Examples: length of a list, number of columns of a data frame. - Find
Operations which attempt to find a value or index of an object, typically with index output.
Examples: find max value, find index of min value, find key of most frequent value - Aggregate
Operations which aggregate the object in a way that involves a computation, typically with scalar output.
Examples: sum all elements of a list, number of occurrences per value
Derive / update¶
Create a derived or altered object from the given object, preserving the object type, or update the object in-place / by-reference.
Examples: head of a list, slicing a string, selecting conditional rows from a data frame.
Subcategories¶
- Transform
Operations that apply a transformation to the object or each of its elements, preserving the shape of the object.
Examples: element-wise operations such as adding a constant to a vector, or computing the cumulative sum over the elements - Mask
Generate a boolean mapping. Typically used as a logical mask or logical index for filtering elements in later operations. - Order
Operations which change the order of elements, but not their values.
Examples: reversing the elements of a list, sorting a data frame by column values - Reshape
Operations which change the shape of the object, but preserves all elements.
Examples: transposing a matrix, converting a data frame to narrow format. - Grow
Operations which possibly increase the number of elements of the object.
Examples: appending elements to a list, replicating elements.- Add
Add one or more new elements. - Replicate
Operations which increase the number of elements through replication or derivation.
- Add
- Shrink
Operations which possibly reduce the number of elements of the object.
Examples: Removing elements from a list, removing duplicates.- :Remove
Remove one or more elements. - Aggregate
Operations which aggregate elements by some grouping logic.
- :Remove
- Combine
Operations which combines, merge or joins two or more objects. The number of elements may grow or shrink, depending on the operation and input.
Examples: stacking lists, set union, joining two data frames.
Convert¶
Export / represent the object as a different data type.
Examples: datetime as string, dictionary as list of key-value pairs, data frame as matrix.
Elements are preserved unless mentioned otherwise. However, some attributes may be lost in the process.