chdir($config{srcdir});
$pagestate{$param{page}}{$id}{R} = Statistics::R->new(shared => 1)
or error("Unable to create an R process");
+ $pagestate{$param{page}}{$id}{R}->start() or
+ error("Unable to start the R process");
chdir($cur_dir);
}
# we currently don't bother to support anything but outputing the
if ($@) {
error("code 'dev.off()' (from internal figure handling) produced error '$@'");
}
- $fig_output = qq(\n<img class="sweavealike" src=").urlto($image_loc,$param{destpage}).qq(" />);
+ $fig_output = qq(\n\n<img class="sweavealike" src=").urlto($image_loc,$param{destpage}).qq(" />\n);
}
if (exists $param{nooutput}) {
return($output.$fig_output);
exists $param{results}) {
$output =~ s/^/ /mg;
}
- return($output);
+ return($output.$fig_output);
}
# stop any started R processes here