PluginR
R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS
This plugin, which can be obtained from Mods, allows to execute R commands in a wiki page and show the results in that page also. Data for the program can be dynamically referenced from tracker item attachments. See an pre-configured example using the profile: http://profiles.tikiwiki.org/r_test
1. Requirements
The R package. On GNU/Linux and similar systems, you can install the base package with something like:
sudo apt-get install r-base r-base-dev r-recommendedor
yum install R R-devel R-lattice
depending on the GNU/Linux distribution that you use.
Once installed, you can start the R console in a terminal by typing "R".
The R package in the server needs the following extra packages for processing xml file types:
- libxml2-dev (from debian GNU/Linux system, or similar name under other GNU/Linux distributions)
And these R packages need to be installed also in the server:
- R4X
- XML
- ... (not finished yet)
You can install them with these commands from the R console:
install.packages("XML", repos = "http://www.omegahat.org/R") install.packages("R4X", repos = "http://R-Forge.R-project.org")
Of course you can use some nice GUI programs on top of R, like the nice multiplatform RKWard: http://rkward.sf.net
2. Testing environment:
- R 2.8.1 (from repos under Ubuntu Jaunty 9.04)
3. Plugin Files
3.1. wiki-plugin_r.php
In mods svn, since August 4th, 2009.
lib/wiki-plugins/wikiplugin_r.php code:
3.2. .htaccess
temp/.htaccess code:
4. How it works
The R script is written within the plugin tags The data file to be processed can be assigned with values provided within the R tags, or uploaded as attachment to a tracker item, and from there, passed to the R plugin with the param attId. The data inside the file is assigned to the R variable data, which can be referenced and used inside the R script in the wiki page.
5. Documentation
See the documentation at: http://doc.tikiwiki.org/PluginR
ToDo
[+]6. References
- http://www.r-project.org
- http://mars.wiwi.hu-berlin.de/mediawiki/sk/index.php/R_Extension_for_MediaWiki_v0.06
- http://mars.wiwi.hu-berlin.de/mediawiki/slides/index.php/Integration_of_R_into_wikis_-_Raw_Output
- http://addictedtor.free.fr/graphiques/
Special thanks to Rodrigo, Luci and Louis-Philippe for their help and advice to develop this plugin.
Contributors to this page: xavi
,
xavidp
and
sylvie
.
Page last modified on Sunday 13 June, 2010 15:30:14 UTC by xavi
.
Sidebar
Sidebar
Search
Last Changed Items
- dev.tw.o: users apparently can delete their tracker items but they are not deleted and no message
- TW5.0B1 Tracker plugin: attachment cannot be saved twice with the same name even if it is part of a different tracker item
- realName user preference is not used in trackerlist, tracker, and pretty tracker
- calendar - update end date of event after start date exceeds it
- Allow Tiki to use virtual currency servers powered by CCLite


Last Comments