PHPackages                             kachkaev/php-r-bundle - 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. kachkaev/php-r-bundle

AbandonedArchivedSymfony-bundle

kachkaev/php-r-bundle
=====================

Symfony2 bundle for integration with php-r library that provides ability to run R scripts from PHP

v2.1.0(8y ago)22.0k3MITPHPPHP &gt;=5.3

Since May 23Pushed 8y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

KachkaevPHPRBundle [![Build Status](https://camo.githubusercontent.com/e787c89faa9ffa4ec5179cea5c502fab2ff826a72f3eb435caa5a22c6a6abeec/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6b6163686b6165762f4b6163686b6165765048505242756e646c652e706e67)](http://travis-ci.org/kachkaev/KachkaevPHPRBundle)
====================================================================================================================================================================================================================================================================================================================

[](#kachkaevphprbundle-)

Symfony2/Symfony3 bundle for the [php-r](https://github.com/kachkaev/php-r) library

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

[](#installation)

### Composer

[](#composer)

Add the following dependency to your project’s composer.json file:

```
    "require": {
        // ...
        "kachkaev/php-r-bundle": "dev-master"
        // ...
    }
```

Now tell composer to download the bundle by running the command:

```
$ php composer.phar update kachkaev/php-r-bundle
```

Composer will install the bundle to `vendor/kachkaev` directory.

### Adding bundle to your application kernel

[](#adding-bundle-to-your-application-kernel)

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Kachkaev\PHPRBundle\KachkaevPHPRBundle(),
        // ...
    );
}
```

Configuration
-------------

[](#configuration)

Here is the default configuration for the bundle:

```
kachkaev_phpr:
    default_engine: command_line     # default R engine (command_line is the only one currently implemented)
    engines:
        command_line:
            path_to_r: /usr/bin/R    # path to R interpreter
```

In most cases custom configuration is not needed, so simply add the following line to your `app/config/config.yml`:

```
kachkaev_phpr: ~
```

Usage
-----

[](#usage)

```
$r = $container->get('kachkaev_phpr.core');
$rResult = $r->run('x = 10
x * x');

// --- or ---

$r = $container->get('kachkaev_phpr.core');
$rProcess = $r->createInteractiveProcess();
$rProcess->write('x = 10');
$rProcess->write('x * x');
$rResult = $rProcess->getAllResult();
```

`$rResult` contains the following string:

```
> x = 10
> x * x
[1] 100

```

For detailed feature description of R core and R process see documentation to [php-r library](https://github.com/kachkaev/php-r).

An instance of `ROutputParser` is also registered as a service:

```
$rOutputParser = $container->get('kachkaev_phpr.output_parser');

$rProcess->write('21 + 21');
var_dump($rProcess->getLastWriteOutput());
// string(6) "[1] 42"
var_dump($rOutputParser->singleNumber($rProcess->getLastWriteOutput()));
// int(42)
```

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

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 ~7 days

Total

4

Last Release

3256d ago

Major Versions

v1.1.0 → v2.0.02017-06-15

PHP version history (2 changes)v1.0.0PHP ~5.3

v1.1.0PHP &gt;=5.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d03c3c41d528f323dbb71ff9f05a4c3d8d9aea5497bfabe1080f77510e4b4d4?d=identicon)[kachkaev](/maintainers/kachkaev)

---

Top Contributors

[![kachkaev](https://avatars.githubusercontent.com/u/608862?v=4)](https://github.com/kachkaev "kachkaev (22 commits)")

---

Tags

phpphp-rrsymfonybundleSymfony2Bridgestatsstatistical analysisr

### Embed Badge

![Health badge](/badges/kachkaev-php-r-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kachkaev-php-r-bundle/health.svg)](https://phpackages.com/packages/kachkaev-php-r-bundle)
```

###  Alternatives

[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[liuggio/excelbundle

This is a Symfony2 Bundle helps you to read and write Excel files (including pdf, xlsx, odt), thanks to the PHPExcel library

3776.4M10](/packages/liuggio-excelbundle)[data-dog/audit-bundle

Audit bundle for symfony2 and doctrine orm, logs any database change

141901.7k1](/packages/data-dog-audit-bundle)[dmishh/settings-bundle

Database centric Symfony configuration management. Global and per-user settings supported.

115254.9k1](/packages/dmishh-settings-bundle)[lexik/currency-bundle

This Symfony2 bundle provide a service and a Twig extension to convert and display currencies.

63234.9k1](/packages/lexik-currency-bundle)[fsi/admin-bundle

FSi Admin Bundle. Admin generator for Symfony.

5849.2k7](/packages/fsi-admin-bundle)

PHPackages © 2026

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