Skip to contents

Provides an R interface for the Chronological Query Language (CQL), primarily used to input commands and describe models to OxCal.

Usage

cql(...)

as_cql(x)

# S3 method for class 'list'
as_cql(x)

# Default S3 method
as_cql(x)

Arguments

...

cql objects to be assembled into a script.

x

Object to be coerced to a cql object.

Value

A CQL script.

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.

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);