Skip to content
Prev 5172 / 21312 Next

[Bioc-devel] Problem running Perl script with R-devel

Some quick ideas:

1. Before making the full call, call res <- system2(perlbin, "-v") to
assert no errors about running Perl itself.  If an error, catch it and
given an information message ("Failed to run 'perl -v'" or something).
That will be user friendly as well for future users who run into
troubles.

2. Before calling system(), you can also assert that the script and
the input files are accessible, cf. file_test("-f") and file.access().
 If not, give an informative error message.

3. Do res <- system(cmd, intern=TRUE, wait=TRUE) and report on 'res'
when there's an error.  It will show the output of your Perl session.

4. You can use x <- normalizePath(x) to create OS-consistent paths/pathnames.

My $.02

/Henrik
On Mon, Jan 27, 2014 at 10:56 AM, Warden, Charles <cwarden at coh.org> wrote: