> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Jay an
> Sent: Thursday, August 21, 2008 8:08 PM
> To: r-help@r-project.org
> Subject: [R] call perl
>
> Hi,
>
> It may be the old question.
> can anyone tell me how to call perl in R?



> # call perl in R
> cat('Here perl, here perl, come here perl\n')



Ok, more seriously it can depend on what you want to do with Perl.

You can use the system or shell command to run any external program including 
perl.

You can open up a pipe connection to send info to or get info from external 
programs including perl.

There is the Rsperl interface (http://www.omegahat.org/RSPerl/)

The book S Poetry (http://www.burns-stat.com/pages/spoetry.html) has a 'perl' 
function that will run perl commands on a character vector (takes care of the 
exporting/importing for you).

If you just want Perl for the regular expressions, there are R functions such 
as regexpr that can use Perl regular expressions directly inside of R (link to 
pcre).

There may be other options, which is best depends on what you want perl to do 
for you.

Hope this helps,


> thanks
>
> Y.
>
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to