portray {rolog} | R Documentation |
Translate an R call to a prolog compound and pretty print it
Description
Translate an R call to a prolog compound and pretty print it
Usage
portray(
query = call("member", expression(X), list(quote(a), "b", 3L, 4, TRUE, expression(Y))),
options = NULL
)
Arguments
query |
an R call. The R call consists of symbols, integers and real numbers, character strings, boolean values, expressions and 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. The names can be modified with the options below. |
options |
This is a list of options controlling translation from and to prolog.
|
Details
The R elements are translated to the following prolog citizens:
numeric -> real (vectors of size N -> #/N)
integer -> integer (vectors -> %/N)
character -> string (vectors -> $$/N)
symbol/name -> atom
expression -> variable
call/language -> compound
boolean -> true, false (atoms)
list -> list
Value
character string with the prolog syntax of the call
See Also
rolog_options()
for fine-grained control over the translation