query {rswipl} | R Documentation |
Create a query
Description
Create a query
Usage
query(
q = call("member", expression(X), list(quote(a), "b", 3L, 4, TRUE, expression(Y)))
)
Arguments
q |
an R call. The R call consists of symbols, integers and real numbers, character strings, boolean values, expressions, lists, and other calls. Vectors of booleans, integers, floating point numbers, and strings with length N > 1 are translated to prolog compounds !/N, %/N, #/N and $$/N, respectively. |
Details
SWI-Prolog does not allow multiple open queries. If another query is open, it it is closed and a warning is shown.
Value
If the creation of the query succeeds, TRUE
See Also
submit()
for submitting a query
clear()
to close the currently open query
Examples
q <- query(call("member", 1, expression(X)))
submit()
submit()
clear()
[Package rswipl version 9.3.7.2 Index]