From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg

Release status:Extension status stable

ImplementationTemplate:Extension#type Tag, Special page
DescriptionTemplate:Extension#description extension R with ScriptTest
Author(s)Template:Extension#username XiangRu Ma (P.swikitalk)
Latest versionTemplate:Extension#version 0.2 (2013-05-16)
MediaWikiTemplate:Extension#mediawiki 1.19.X, 1.20.X
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GPLv2
Download Script
  • $wgRroot
  • $wgRScriptPath
  • $wgRDataPath

  • <R>
  • <Rform>
Added rightsTemplate:Extension#rights

  • useR
  • useShell
Hooks usedTemplate:Extension#hook

Translate the Script extension if it is available at translatewiki.net

Check usage and version matrix.

The Script extension does compute with R, and test script of R, Perl, PHP and etc..

Feature overview[edit source]

  • Script provide tags (r and rform) to compute with R.
  • The script of Programming languages or linux shell can be tested via a Special:Specialpages--- Special:ScriptTest.
  • User rights of implement this extension can be changed.

Requirement[edit source]

Download[edit source]

This extension can be obtained offsite from here (click starts the download).

Installation[edit source]

Once you have downloaded the code, place the Survey directory within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

require_once( "$IP/extensions/Script/Script.php" );
$wgRroot = "/var/www/html/wiki";
$wgRScriptPath = "/images";
$wgRDataPath = "/images";

Configuration parameters[edit source]

$wgRroot = "/var/www/html/wiki";
$wgRScriptPath = "/images";
$wgRDataPath = "/images";

R configure file: /extensions/Script/rwiki.r

User rights[edit source]

User rights of implement this extension can be changed for security.

default configure of user right
$wgGroupPermissions['sysop']['useR']   = true;
$wgGroupPermissions['sysop']['useShell']   = true;

Usage[edit source]

<Rform name="binom">
x:<input type="text" name="x" size="50" value="c(10,20)"><br />
p:<input type="text" name="p" size="5" maxlength="5" value="0.4">
<R name="binom">
if (exists("x")) x<-ctext(x) else x<-c(10,20);
if (exists("p")) p<-ctext(p) else p<-0.4;

Supported languages[edit source]

These are the Programming languages known by Script that can be used in ScriptTest.

  • R script
  • perl script
  • php script
  • python script
  • matlab script
  • lua script
  • ruby script
  • bash shell

See also[edit source]

Other languages:Project:Language policy English  • 日本語