title: Calling Prolog from R
body: <p>It is possible to call R from within Prolog, using a <a href="http://www.swi-prolog.org/pack/file_details/real/prolog/real.pl" rel="nofollow">library</a>  recently implemented in SWI and YAP Prolog variants.</p>
  
  <p>Reciprocally, is there any way of calling Prolog from within R ? In the absence of a direct R - Prolog interface capable of binding Prolog terms to R just as Rcpp binds C++ objects to R objects, is there any indirect way to achieve this aim (like calling Prolog from C++ code embedded in R code via Rcpp)?</p>
  
  <p>By ’calling’, I mean ’linking’ prolog terms to R objects, as is possible for C++ objects using Rcpp, and executing prolog queries through R function wrappers, without resorting to operating system calls.</p>