a question

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

a question

Jeela Mohammadian
Hi,

I must seek a favour regarding of R project,

 

can we make an application out of R. I mean a small application that
automatically runs and do the estimation automatically. Because the
things I do is that I copy codes from script to work book and then it
runs and gives the output. can it be done automatically?

I will appreaciate if you could answer.

Best Regards

Jeela

 

 


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: a question

Jonathan P Daily
What operating system are you working with? On windows, making it run by
double clicking on it from explorer is not going to work. You will
probably have to write a batch file that invokes Rterm or Rscript (see
documentation for which you want to use). So if your script file is
"myscript.r", you could use Rterm myscript.r so long as the R executable
directory is in the search path.

On linux, make sure to start your script starts with #!/usr/bin/env
Rscript, and make it executable (i.e. chmod +x myscript.r). Now it should
run when you type ./myscript.r

HTH,
Jon
--------------------------------------
Jonathan P. Daily
Technician - USGS Leetown Science Center
11649 Leetown Road
Kearneysville WV, 25430
(304) 724-4480
"Is the room still a room when its empty? Does the room,
 the thing itself have purpose? Or do we, what's the word... imbue it."
     - Jubal Early, Firefly

[hidden email] wrote on 03/16/2011 06:18:09 AM:

> [image removed]
>
> [R] a question
>
> Jeela Mohammadian
>
> to:
>
> r-help
>
> 03/16/2011 08:59 AM
>
> Sent by:
>
> [hidden email]
>
> Hi,
>
> I must seek a favour regarding of R project,
>
>
>
> can we make an application out of R. I mean a small application that
> automatically runs and do the estimation automatically. Because the
> things I do is that I copy codes from script to work book and then it
> runs and gives the output. can it be done automatically?
>
> I will appreaciate if you could answer.
>
> Best Regards
>
> Jeela
>
>
>
>
>
>
>    [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: a question

David Winsemius

On Mar 16, 2011, at 9:07 AM, Jonathan P Daily wrote:

> What operating system are you working with? On windows, making it  
> run by
> double clicking on it from explorer is not going to work. You will
> probably have to write a batch file that invokes Rterm or Rscript (see
> documentation for which you want to use). So if your script file is
> "myscript.r", you could use Rterm myscript.r so long as the R  
> executable
> directory is in the search path.
>
> On linux, make sure to start your script starts with #!/usr/bin/env
> Rscript, and make it executable (i.e. chmod +x myscript.r). Now it  
> should
> run when you type ./myscript.r

There may be additional routes to success. Gabor Grothendieck has  
written a suite of batch files for Windows applications and you  
couldfollow the example code in building your particular clickable  
routine, and Dirk Eddelbeuttel has written "Little R" or more  
accurately `littler` which is designed to support non-interactive,  
special purpose R sessions.

--
David.

>
> HTH,
> Jon
> --------------------------------------
> Jonathan P. Daily
> Technician - USGS Leetown Science Center
> 11649 Leetown Road
> Kearneysville WV, 25430
> (304) 724-4480
> "Is the room still a room when its empty? Does the room,
> the thing itself have purpose? Or do we, what's the word... imbue it."
>     - Jubal Early, Firefly
>
> [hidden email] wrote on 03/16/2011 06:18:09 AM:
>
>> [image removed]
>>
>> [R] a question
>>
>> Jeela Mohammadian
>>
>> to:
>>
>> r-help
>>
>> 03/16/2011 08:59 AM
>>
>> Sent by:
>>
>> [hidden email]
>>
>> Hi,
>>
>> I must seek a favour regarding of R project,
>>
>> can we make an application out of R. I mean a small application that
>> automatically runs and do the estimation automatically. Because the
>> things I do is that I copy codes from script to work book and then it
>> runs and gives the output. can it be done automatically?
>>
>> I will appreaciate if you could answer.
>>
>> Best Regards
>>
>> Jeela

David Winsemius, MD
West Hartford, CT

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: a question

Greg Snow-2
In reply to this post by Jeela Mohammadian
If you do ?Startup then you get the help page that describes all that R does as it starts up and there are a few places in there that it describes where you can put things to be run automatically.

I have done this for a doctor before who wanted to show the demonstration I showed him to others, but did not know any R, so I installed R for him and set a script to automatically run so he just double clicked on the icon and R started and ran the demonstration for him.  This sounds similar to what you want.  In my case I used .Rprofile, but there are other options in the Startup help page that may work better for you.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[hidden email]
801.408.8111


> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of Jeela Mohammadian
> Sent: Wednesday, March 16, 2011 4:18 AM
> To: [hidden email]
> Subject: [R] a question
>
> Hi,
>
> I must seek a favour regarding of R project,
>
>
>
> can we make an application out of R. I mean a small application that
> automatically runs and do the estimation automatically. Because the
> things I do is that I copy codes from script to work book and then it
> runs and gives the output. can it be done automatically?
>
> I will appreaciate if you could answer.
>
> Best Regards
>
> Jeela
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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.