Pass Parameters to RScript?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Pass Parameters to RScript?

R help mailing list-2
Is it possible to pass parameters to an R Script, say, from Java or other language?

I did some searches, but came up blank.

Thanks very much in advance,

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Pass Parameters to RScript?

Eric Berger
I did a simple search and got  hits immediately, e.g.
https://www.r-bloggers.com/passing-arguments-to-an-r-script-from-command-lines/


On Mon, Oct 30, 2017 at 2:30 PM, Morkus via R-help <[hidden email]>
wrote:

> Is it possible to pass parameters to an R Script, say, from Java or other
> language?
>
> I did some searches, but came up blank.
>
> Thanks very much in advance,
>
> Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted
> email.
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Pass Parameters to RScript?

R help mailing list-2
Thanks Eric,

I saw that page, too, but it states:

"This post describes how to pass external arguments to R when calling a Rscript with a command line."

Not what I'm trying to do.

Thanks for your reply.

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

> -------- Original Message --------
> Subject: Re: [R] Pass Parameters to RScript?
> Local Time: October 30, 2017 9:39 AM
> UTC Time: October 30, 2017 1:39 PM
> From: [hidden email]
> To: Morkus <[hidden email]>
> [hidden email] <[hidden email]>
>
> I did a simple search and got  hits immediately, e.g.
> https://www.r-bloggers.com/passing-arguments-to-an-r-script-from-command-lines/
>
> On Mon, Oct 30, 2017 at 2:30 PM, Morkus via R-help <[hidden email]> wrote:
>
>> Is it possible to pass parameters to an R Script, say, from Java or other language?
>>
>> I did some searches, but came up blank.
>>
>> Thanks very much in advance,
>>
>> Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> 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.
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Pass Parameters to RScript?

Eric Berger
I do not program in Java but it seems a Java program can make system calls
which would be equivalent to running from the command line, but done from
within a Java program. Not sure whether that would meet your needs and if
not why not. Just a suggestion.

Check out

http://www.java-samples.com/showtutorial.php?tutorialid=8



On Mon, Oct 30, 2017 at 5:10 PM, Morkus <[hidden email]> wrote:

> Thanks Eric,
>
> I saw that page, too, but it states:
>
> "This post describes how to pass external arguments to *R* when calling a
> Rscript *with a command line.*"
>
> Not what I'm trying to do.
>
> Thanks for your reply.
>
> Sent from ProtonMail <https://protonmail.com>, Swiss-based encrypted
> email.
>
>
> -------- Original Message --------
> Subject: Re: [R] Pass Parameters to RScript?
> Local Time: October 30, 2017 9:39 AM
> UTC Time: October 30, 2017 1:39 PM
> From: [hidden email]
> To: Morkus <[hidden email]>
> [hidden email] <[hidden email]>
>
> I did a simple search and got  hits immediately, e.g.
> https://www.r-bloggers.com/passing-arguments-to-an-r-
> script-from-command-lines/
>
>
> On Mon, Oct 30, 2017 at 2:30 PM, Morkus via R-help <[hidden email]>
> wrote:
>
>> Is it possible to pass parameters to an R Script, say, from Java or other
>> language?
>>
>> I did some searches, but came up blank.
>>
>> Thanks very much in advance,
>>
>> Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted
>> email.
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Pass Parameters to RScript?

Jeff Newmiller
I do not do this either, and technically this list is not the right place to ask this multi-language question, rather apparently [1] is because the alternative to using a system call is to use the Rserve service. You should use a search engine to look for info on using rjava and rserve.

[1] https://mailman.rz.uni-augsburg.de/pipermail/stats-rosuda-devel/
--
Sent from my phone. Please excuse my brevity.

On October 30, 2017 8:33:48 AM PDT, Eric Berger <[hidden email]> wrote:

>I do not program in Java but it seems a Java program can make system
>calls
>which would be equivalent to running from the command line, but done
>from
>within a Java program. Not sure whether that would meet your needs and
>if
>not why not. Just a suggestion.
>
>Check out
>
>http://www.java-samples.com/showtutorial.php?tutorialid=8
>
>
>
>On Mon, Oct 30, 2017 at 5:10 PM, Morkus <[hidden email]> wrote:
>
>> Thanks Eric,
>>
>> I saw that page, too, but it states:
>>
>> "This post describes how to pass external arguments to *R* when
>calling a
>> Rscript *with a command line.*"
>>
>> Not what I'm trying to do.
>>
>> Thanks for your reply.
>>
>> Sent from ProtonMail <https://protonmail.com>, Swiss-based encrypted
>> email.
>>
>>
>> -------- Original Message --------
>> Subject: Re: [R] Pass Parameters to RScript?
>> Local Time: October 30, 2017 9:39 AM
>> UTC Time: October 30, 2017 1:39 PM
>> From: [hidden email]
>> To: Morkus <[hidden email]>
>> [hidden email] <[hidden email]>
>>
>> I did a simple search and got  hits immediately, e.g.
>> https://www.r-bloggers.com/passing-arguments-to-an-r-
>> script-from-command-lines/
>>
>>
>> On Mon, Oct 30, 2017 at 2:30 PM, Morkus via R-help
><[hidden email]>
>> wrote:
>>
>>> Is it possible to pass parameters to an R Script, say, from Java or
>other
>>> language?
>>>
>>> I did some searches, but came up blank.
>>>
>>> Thanks very much in advance,
>>>
>>> Sent from [ProtonMail](https://protonmail.com), Swiss-based
>encrypted
>>> email.
>>>         [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posti
>>> ng-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>
>>
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>[hidden email] mailing list -- To UNSUBSCRIBE and more, see
>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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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 | Threaded
Open this post in threaded view
|

Re: Pass Parameters to RScript?

R help mailing list-2
In reply to this post by R help mailing list-2
Hello Morcus,

Is your question really about language inter-operability?
If so, have you checked out rJava?

"rJava: Low-Level R to Java Interface"
 https://CRAN.R-project.org/package=rJava
http://www.rforge.net/rJava/

Regards,

Bill.

W. Michels, Ph.D.


On Mon, Oct 30, 2017 at 8:10 AM, Morkus via R-help <[hidden email]> wrote:

> Thanks Eric,
>
> I saw that page, too, but it states:
>
> "This post describes how to pass external arguments to R when calling a Rscript with a command line."
>
> Not what I'm trying to do.
>
> Thanks for your reply.
>
> Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
>
>> -------- Original Message --------
>> Subject: Re: [R] Pass Parameters to RScript?
>> Local Time: October 30, 2017 9:39 AM
>> UTC Time: October 30, 2017 1:39 PM
>> From: [hidden email]
>> To: Morkus <[hidden email]>
>> [hidden email] <[hidden email]>
>>
>> I did a simple search and got  hits immediately, e.g.
>> https://www.r-bloggers.com/passing-arguments-to-an-r-script-from-command-lines/
>>
>> On Mon, Oct 30, 2017 at 2:30 PM, Morkus via R-help <[hidden email]> wrote:
>>
>>> Is it possible to pass parameters to an R Script, say, from Java or other language?
>>>
>>> I did some searches, but came up blank.
>>>
>>> Thanks very much in advance,
>>>
>>> Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
>>>         [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>> 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.
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.