| tulpa_is_spatial_bar | R Documentation |
Test whether a one-sided formula carries a single varying-coefficient
grouping bar of the form ~ 1 + w || node (independent fields, ||) or
~ 1 + w | node (correlated fields, |). This is the same grammar
spatial() and the inline temporal() field constructor accept, and the
grammar tulpa_bar_field_specs() expands. A downstream package can use it to
branch on "is this term a spatial / temporal varying-coefficient bar?" before
calling tulpa_bar_field_specs().
tulpa_is_spatial_bar(x)
x |
A one-sided formula (e.g. |
A single logical: TRUE when x is (or wraps) a | / || bar,
FALSE otherwise (a plain formula such as ~ 1 + w, a non-bar term, or a
non-formula / non-language input).
tulpa_bar_field_specs() for expanding the bar into per-column
field specs.
tulpa_is_spatial_bar(~ 1 + w || cell) # TRUE
tulpa_is_spatial_bar(~ 1 + w | cell) # TRUE (correlated)
tulpa_is_spatial_bar(~ 1 + w) # FALSE (no bar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.