Skip to content
/ YapR Public

A YAP module to provide an interface to the R-project in the Prolog engine

Notifications You must be signed in to change notification settings

jcazevedo/YapR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YapR

YapR is a YAP module to enable the access to R-project facilities in the Prolog engine.

Current version only tested in windows.

Example Usage

?- use_module(yapr).
?- r_predicate(sum, [[1,2,3]], X).
X = 6.0 ?
yes
?- r_predicate(sort, [[2,3,1]], X).
X = [1.0, 2.0|3.0] ?
yes
?- r_predicate('%*%', [[[1,2,3],[4,5,6],[7,8,9]],[[1,1],[1,1],[1,1]]], X).
X = [[6.0|6.0],[15.0|15.0],[24.0|24.0]] ?
yes
?- r_predicate(sqrt, [16], X).
X = 4.0 ?
yes
?- r_predicate(t, [[[1,1],[1,1],[1,1]]], X).
X = [[1.0,1.0|1.0],[1.0,1.0|1.0]] ?
yes
?- r_command('source("C:/sample.R")').
yes

About

A YAP module to provide an interface to the R-project in the Prolog engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published