Provides an R interface for the Chronological Query Language (CQL), primarily used to input commands and describe models to OxCal.
Details
CQL scripts are represented by the S3 class cql. cql() takes the output
of individual cql_ functions and assembles them into a single script. See
vignette("cql") for a tutorial.
List arguments to cql() are collapsed to produce a single script. If you
want to coerce an object to cql and preserve its structure, use as_cql()
instead.
See also
Other CQL functions:
cql_boundary(),
cql_n(),
cql_options(),
cql_other,
cql_phase(),
cql_r_date(),
cql_sequence(),
write_oxcal()
Examples
# Assemble individual CQL commands into a script
cql(
cql_r_date("ABC-001", 10100, 50),
cql_r_date("ABC-002", 10200, 50)
)
#> // CQL2 generated by stratigraphr v0.5.0
#> R_Date("ABC-001", 10100, 50);
#> R_Date("ABC-002", 10200, 50);
# Coerce a character string to a cql object
as_cql("R_Date(\"ABC-001\", 10100, 50);")
#> // CQL2 generated by stratigraphr v0.5.0
#> R_Date("ABC-001", 10100, 50);