Loading...
 
Tiki and PluginR

Tiki and PluginR


SVG and PDF

posts: 1797 Catalan Countries

For some reason, it seems that in some servers, SVG and PDF generation from the figures fail.

I presume that it has to do with missing dependencies of "cairo" package (either operating system package dependency, or R package) or similar.

But I'm not sure yet which are the precise packages that need to be installed to solve that issue (we don't have that issue in our own server). Cairo is my first bet.

Joël, can you run this in your server (from a wiki page, if you don't have ssh access to the server where PluginR is installed), and report the output you get?:

capabilities()


You should see something like:

jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets   libxml     fifo   cledit    iconv 
    TRUE     TRUE     TRUE     TRUE     TRUE    FALSE     TRUE     TRUE     TRUE     TRUE     TRUE     TRUE 
     NLS  profmem    cairo 
    TRUE     TRUE     TRUE


The important part here is the last one, below "cairo", which should say TRUE.


posts: 34 France

On "Joël's server" :-)
Yes, cairo is TRUE

> capabilities()
jpeg png tiff tcltk X11 aqua http/ftp sockets
TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE
libxml fifo cledit iconv NLS profmem cairo
TRUE TRUE TRUE TRUE TRUE TRUE TRUE


posts: 946

Aha, it seems, though, that X11 is FALSE... :-/

Mmm... can you try with "x11=0" in your params?
See https://doc.tiki.org/PluginR

x11 int 1 Choose whether the server can use X11 to produce graphs in R, or alternatively use dev2bitmap instead (Optional). Options: 1 (R has support for X11, default), 0 (no support for X11 thus using dev2bitmap). These capabilities can be checked in the server with the command in the R console: capabilities() n 0,4


Last, Jyhem, I see that the echo'ed output in your page:
https://wikispiral.org/tiki-index.php?page=R+tests+SPIRAL

is out of the CODE box. I noticed that this issue happened to me every now and then, but when I refreshed the page, the issues was solved. Maybe that now we have cached versions of the first page, we need a better solution for this.
The tricky part is between lines 677 and 680 of PluginRR php code:

//Remove the first 5 lines which come from pluginr headers
$echo_content = implode("\n", array_slice(explode("\n", $content), 5));
//Remove the last 2 lines of R code which come from other pluginr params
$echo_content = implode("\n", array_slice(explode("\n", $echo_content), 0, -2));


When the plugin R calls do not have a line feed at the beginning (after the start plugin R tag) and/or end (before the last { R } end tag), it seems that the content is placed out of the CODE box, or missing some lines.

Jyhem, do you see a better way of solving this issue?


Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.