PHPackages                             okvpn/php-rdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. okvpn/php-rdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

okvpn/php-rdk
=============

Integrating PHP and R

1.0.1(7y ago)571[2 issues](https://github.com/okvpn/php-rdk/issues)MITPHPPHP &gt;=5.5.9

Since May 23Pushed 7y ago2 watchersCompare

[ Source](https://github.com/okvpn/php-rdk)[ Packagist](https://packagist.org/packages/okvpn/php-rdk)[ Docs](https://github.com/okvpn/php-rdk)[ RSS](/packages/okvpn-php-rdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (5)Used By (0)

php-rdk
=======

[](#php-rdk)

Integrating PHP and R

Purpose
-------

[](#purpose)

Sometimes there is a need to make complex calculations and analyze the data, but your application is written in PHP. As is known that PHP a badly programming language for statistics calculation and data manning. But R is a language and environment for statistical computing and graphics. So this library provide integration between R and PHP.

Installation
------------

[](#installation)

- Install [Composer](https://getcomposer.org/) following the official Composer [documentation](https://getcomposer.org/download/)

```
composer require okvpn/php-rdk

```

- Install R

```
sudo apt-get install r-base

```

Run command to confirms that R successfully installed.

```
R --version

Output:

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

```

Example
-------

[](#example)

#### Run R script

[](#run-r-script)

```
use Okvpn\R\Process\RProcess;
use Okvpn\R\UnixPipes;

$rPath = '/usr/bin/R'; //path to R
$process = new RProcess(new UnixPipes(), $rPath);
$process->start();

$rOutput = $process->write(getAllOutput());
```

Output image `/tmp/test.png`:

[![Image](./doc/img/test.png)](./doc/img/test.png)

#### Use expression builder

[](#use-expression-builder)

```
use Okvpn\R\Process\ProcessManager;
use Okvpn\R\Types\Type;

$rProcess = ProcessManager::create();
$exprBuilder = $rProcess->createExpressionBuilder();

$result = $exprBuilder
    ->select('t(combn(c(0:3), :b))', Type::MATRIX)
    ->setParameter('b', $b)
    ->execute()->getSingleResult();
```

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE).

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~199 days

Total

4

Last Release

2726d ago

Major Versions

0.1.0 → 1.0.0-RC12017-12-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/72ab45c38dd8963c58e34948277405642f3e498f5ffc7508cea6e51a5dcdd24f?d=identicon)[vtsykun](/maintainers/vtsykun)

---

Top Contributors

[![vtsykun](https://avatars.githubusercontent.com/u/21358010?v=4)](https://github.com/vtsykun "vtsykun (11 commits)")

---

Tags

php-rrr

### Embed Badge

![Health badge](/badges/okvpn-php-rdk/health.svg)

```
[![Health](https://phpackages.com/badges/okvpn-php-rdk/health.svg)](https://phpackages.com/packages/okvpn-php-rdk)
```

###  Alternatives

[cturbelin/rserve-php

Rserve client library for PHP

4435.0k](/packages/cturbelin-rserve-php)[sudiptpa/guid

A minimal GUID generator package for PHP.

14144.5k1](/packages/sudiptpa-guid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
