running R-code outside of R

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

running R-code outside of R

Roger Leenders

R 2.7.0, WinXP

Hi list,

I have written some code in R that I would like to share with others who
are not R-users. Is there a way to compile the code so it will run
outside of R?
The best thing would be a functionality to compile the code into a ".exe"
file that does not require the user to have R installed or to know how to
use R. The persons I would like to make the program available to are unlikely to ever need or use software like R.

Is there a functionality that will allow others to use my code without
needing R itself?

thanks, roger

______________________________________________
[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: running R-code outside of R

Rolf Turner

On 25/06/2008, at 6:01 AM, Roger Leenders wrote:

>
> R 2.7.0, WinXP
>
> Hi list,
>
> I have written some code in R that I would like to share with  
> others who
> are not R-users. Is there a way to compile the code so it will run
> outside of R?
> The best thing would be a functionality to compile the code into a  
> ".exe"
> file that does not require the user to have R installed or to know  
> how to
> use R. The persons I would like to make the program available to  
> are unlikely to ever need or use software like R.
>
> Is there a functionality that will allow others to use my code without
> needing R itself?

        This reminds me of that old Lovin' Spoonful song:

                ``Do You Believe in Magic?''


                        cheers,

                                Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}

______________________________________________
[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: running R-code outside of R

Spencer Graves
      A short answer to your question is 'yes and no':  R is an
interpreted language.  There may have been attempts to create a
"compiler" for R, but I don't know if any have actually succeeded very
well.

      However, there are ways to (a) call R from other languages and (b)
run R in batch mode.  For example, I've seen packages that allow Excel
users to run selected R functions.  I'm not current on preferred ways of
doing that, but if I had to do it, I might consider the RExcelInstaller
and RODBC packages.  Also, I know people have created web pages that
pass data to R and display the results in a web page without burdening
the user with learning R.  I don't know how this works, but I just got
125 hits from "RSiteSearch('running R in batch mode')".

      If you want to provide more specifics of what you would like to
do, you might get more useful suggestions.  And, yes, I do believe in
magic,  but sometimes it requires a little creative thought.

      Hope this helps.
      Spencer Graves

Rolf Turner wrote:

>
> On 25/06/2008, at 6:01 AM, Roger Leenders wrote:
>
>>
>> R 2.7.0, WinXP
>>
>> Hi list,
>>
>> I have written some code in R that I would like to share with others who
>> are not R-users. Is there a way to compile the code so it will run
>> outside of R?
>> The best thing would be a functionality to compile the code into a
>> ".exe"
>> file that does not require the user to have R installed or to know
>> how to
>> use R. The persons I would like to make the program available to are
>> unlikely to ever need or use software like R.
>>
>> Is there a functionality that will allow others to use my code without
>> needing R itself?
>
>     This reminds me of that old Lovin' Spoonful song:
>
>         ``Do You Believe in Magic?''
>
>
>             cheers,
>
>                 Rolf Turner
>
> ######################################################################
> Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
>
> ______________________________________________
> [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: running R-code outside of R

Jim Porzak
In reply to this post by Roger Leenders
Roger,

Following on to Spencer's comments, we have had some success using RWui
http://rwui.cryst.bbk.ac.uk/
to build web enabled versions of (non-interactive) R programs.

Advantage is your users only need a browser. No exe to install. Downside is
you need to have a web server accessible to your user base. We're using a
very simple Tomcat setup within our firewall to provide access to canned R
scripts.


HTH,
Jim Porzak
Responsys, Inc.
San Francisco, CA
http://www.linkedin.com/in/jimporzak

On Tue, Jun 24, 2008 at 11:01 AM, Roger Leenders <[hidden email]>
wrote:

>
> R 2.7.0, WinXP
>
> Hi list,
>
> I have written some code in R that I would like to share with others who
> are not R-users. Is there a way to compile the code so it will run
> outside of R?
> The best thing would be a functionality to compile the code into a ".exe"
> file that does not require the user to have R installed or to know how to
> use R. The persons I would like to make the program available to are
> unlikely to ever need or use software like R.
>
> Is there a functionality that will allow others to use my code without
> needing R itself?
>
> thanks, roger
>
> ______________________________________________
> [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.
>

        [[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: running R-code outside of R

Gabor Grothendieck
In reply to this post by Roger Leenders
You can set up a web site and have them use that.  Then they
just need a browser.

See www.rpad.org for one way or develop an internal or external site
using any technology you know and call R on the back end.

On Tue, Jun 24, 2008 at 2:01 PM, Roger Leenders <[hidden email]> wrote:

>
> R 2.7.0, WinXP
>
> Hi list,
>
> I have written some code in R that I would like to share with others who
> are not R-users. Is there a way to compile the code so it will run
> outside of R?
> The best thing would be a functionality to compile the code into a ".exe"
> file that does not require the user to have R installed or to know how to
> use R. The persons I would like to make the program available to are
> unlikely to ever need or use software like R.
>
> Is there a functionality that will allow others to use my code without
> needing R itself?
>
> thanks, roger
>
> ______________________________________________
> [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: running R-code outside of R

esmail
In reply to this post by Jim Porzak
Jim Porzak wrote:

> Roger,
>
> Following on to Spencer's comments, we have had some success using RWui
> http://rwui.cryst.bbk.ac.uk/
> to build web enabled versions of (non-interactive) R programs.
>
> Advantage is your users only need a browser. No exe to install. Downside is
> you need to have a web server accessible to your user base. We're using a
> very simple Tomcat setup within our firewall to provide access to canned R
> scripts.

Hi,

This sounds interesting, I have one question though (I quickly looked at
the page but didn't find an obvious answer)

Would the R script that is being run be hidden from the user, or would the
user be able to view/download/save the R source code - or could it be hidden
so they just run the code, but never see it?

Esmail

______________________________________________
[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: running R-code outside of R

Jim Porzak
The user of your R script sees only the outputs you create. The R source is
hidden.

HTH,
Jim Porzak
Responsys, Inc.
San Francisco, CA
http://www.linkedin.com/in/jimporzak

On Tue, Jun 24, 2008 at 9:33 PM, Esmail Bonakdarian <[hidden email]>
wrote:

> Jim Porzak wrote:
>
>> Roger,
>>
>> Following on to Spencer's comments, we have had some success using RWui
>> http://rwui.cryst.bbk.ac.uk/
>> to build web enabled versions of (non-interactive) R programs.
>>
>> Advantage is your users only need a browser. No exe to install. Downside
>> is
>> you need to have a web server accessible to your user base. We're using a
>> very simple Tomcat setup within our firewall to provide access to canned R
>> scripts.
>>
>
> Hi,
>
> This sounds interesting, I have one question though (I quickly looked at
> the page but didn't find an obvious answer)
>
> Would the R script that is being run be hidden from the user, or would the
> user be able to view/download/save the R source code - or could it be
> hidden
> so they just run the code, but never see it?
>
> Esmail
>

        [[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: running R-code outside of R

Андрей Парамонов
On 25 июн, 09:28, "Jim Porzak" <[hidden email]> wrote:
> The user of your R script sees only the outputs you create. The R source is
> hidden.
>

But you may expose R sources via the web server if you wish.

Andrey

______________________________________________
[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: running R-code outside of R

esmail
In reply to this post by Jim Porzak
Jim Porzak wrote:
> The user of your R script sees only the outputs you create. The R source
> is hidden.

Ah .. that sounds great .. I wish I had known about this a month ago!
I'll have to check it out - thanks!

Esmail


> HTH,
> Jim Porzak
<..>
> >   Would the R script that is being run be hidden from the user, or
> >   would the
> >   user be able to view/download/save the R source code - or could it
> >   be hidden
> >   so they just run the code, but never see it?
> >
> >   Esmail

______________________________________________
[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: running R-code outside of R

Spencer Graves
      If you want to hide the fact that you are using R -- especially if
you charge people for your software that uses R clandestinely -- that's
a violation of the license (GPL).  I doubt if anyone associated with R
would bother with a lawsuit, but a competitor who offers related
software might.

      Best Wishes,
      Spencer

Esmail Bonakdarian wrote:

> Jim Porzak wrote:
>> The user of your R script sees only the outputs you create. The R
>> source is hidden.
>
> Ah .. that sounds great .. I wish I had known about this a month ago!
> I'll have to check it out - thanks!
>
> Esmail
>
>
>> HTH,
>> Jim Porzak
> <..>
>> >   Would the R script that is being run be hidden from the user, or
>> >   would the
>> >   user be able to view/download/save the R source code - or could it
>> >   be hidden
>> >   so they just run the code, but never see it?
>> >
>> >   Esmail
>
> ______________________________________________
> [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: running R-code outside of R

Michael Conklin

Spencer Graves wrote:

>      If you want to hide the fact that you are using R -- especially
if >you charge people for your software that uses R clandestinely --
that's a >violation of the license (GPL).  I doubt if anyone associated
with R would >bother with a lawsuit, but a competitor who offers related
software might. >
>
>      Best Wishes,
>      Spencer

Do I understand the implication of the license correctly (forgive my
ignorance here).  

If I analyze a client's data using an R script I created then I can
charge the client a $20,000 consulting fee, but, if I let the client
push the button to execute the R script and charge him 10 cents for the
privilege then I can be sued for violating the GPL?  Or are my
assumptions on the first part also incorrect and R can only be used for
the free betterment of mankind?

Mike

______________________________________________
[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: running R-code outside of R

Gábor Csárdi-2
Some clarifications.

R's license (GPL v2) is not about money,
you can charge anyone as much as you wish.

If you create an R program (and don't modify R itself), then
you can distribute that program according to any license you wish.

If you modify R itself _and_ distribute the modified version,
then you have to give the source code of the modified version, along with
the distributed binaries. Again, this is not about money, you _must_
publish the sources, even if your new version is for free.

If you create a website and the user uses R and your code
through that site only, then you don't have to give the source code
to anyone. Basically, you have no obligations in this case.
Spencer is right that this might be against the
principles of the license, but legally it is fine.
It might change if R will ever use GPL version 3.

Gabor

On Wed, Jun 25, 2008 at 10:28:09AM -0500, Michael Conklin wrote:

>
> Spencer Graves wrote:
>
> >      If you want to hide the fact that you are using R -- especially
> if >you charge people for your software that uses R clandestinely --
> that's a >violation of the license (GPL).  I doubt if anyone associated
> with R would >bother with a lawsuit, but a competitor who offers related
> software might. >
> >
> >      Best Wishes,
> >      Spencer
>
> Do I understand the implication of the license correctly (forgive my
> ignorance here).  
>
> If I analyze a client's data using an R script I created then I can
> charge the client a $20,000 consulting fee, but, if I let the client
> push the button to execute the R script and charge him 10 cents for the
> privilege then I can be sued for violating the GPL?  Or are my
> assumptions on the first part also incorrect and R can only be used for
> the free betterment of mankind?
>
> Mike
>
> ______________________________________________
> [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.

--
Csardi Gabor <[hidden email]>    UNIL DGM

______________________________________________
[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: running R-code outside of R

Ramon Diaz-Uriarte-2
In reply to this post by Michael Conklin
I am not an expert nor a lawyer but ...

On Wed, Jun 25, 2008 at 5:28 PM, Michael Conklin
<[hidden email]> wrote:

>
> Spencer Graves wrote:
>
>>      If you want to hide the fact that you are using R -- especially
> if >you charge people for your software that uses R clandestinely --
> that's a >violation of the license (GPL).  I doubt if anyone associated
> with R would >bother with a lawsuit, but a competitor who offers related
> software might. >
>>
>>      Best Wishes,
>>      Spencer
>
> Do I understand the implication of the license correctly (forgive my
> ignorance here).
>
> If I analyze a client's data using an R script I created then I can
> charge the client a $20,000 consulting fee, but, if I let the client
> push the button to execute the R script and charge him 10 cents for the
> privilege then I can be sued for violating the GPL?  Or are my

I think you cannot be sued for the second either. In fact, the status
of the code behind web-based applications was part of the reason for
the creation of the Affero GPL.  Some of the provisions in the Affero
license, I think, were initially supposed to have been included in the
GPL 3, but they finally weren't.

These links might be relevant:

http://www.affero.org/oagf.html
http://fsfeurope.org/projects/gplv3/fisl-rms-transcript.en.html#q20-affero
http://www.gnu.org/licenses/gpl-faq.html#TOCUnreleasedMods

Since R is covered by the GPL, not the Affero license, I think you
cannot be sued. (That said, I personally use the Affero license for
all our web-based stuff).

> assumptions on the first part also incorrect and R can only be used for
> the free betterment of mankind?
>

I think that cynical remark is totally out of line.


R.



> Mike
>
> ______________________________________________
> [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.
>



--
Ramon Diaz-Uriarte
Statistical Computing Team
Structural Biology and Biocomputing Programme
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz
Phone: +34-91-224-6900 ext. 3019

______________________________________________
[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: running R-code outside of R

Marc Schwartz
In reply to this post by Michael Conklin
on 06/25/2008 10:28 AM Michael Conklin wrote:

> Spencer Graves wrote:
>
>>      If you want to hide the fact that you are using R -- especially
> if >you charge people for your software that uses R clandestinely --
> that's a >violation of the license (GPL).  I doubt if anyone associated
> with R would >bother with a lawsuit, but a competitor who offers related
> software might. >
>>      Best Wishes,
>>      Spencer
>
> Do I understand the implication of the license correctly (forgive my
> ignorance here).  
>
> If I analyze a client's data using an R script I created then I can
> charge the client a $20,000 consulting fee, but, if I let the client
> push the button to execute the R script and charge him 10 cents for the
> privilege then I can be sued for violating the GPL?  Or are my
> assumptions on the first part also incorrect and R can only be used for
> the free betterment of mankind?
>
> Mike

Caveat: IANAL

Strictly speaking, the GPL really only applies if you plan to distribute
binary software to end users that contains or links to R Foundation
source code or CRAN packages licensed under the GPL.

In such a situation, the so-called 'viral' part of the GPL would require
that you make your source code available as well.

If you are not distributing binary software under those circumstances,
then you need not make your source code available, any more than if you
were to analyze data using any other application, GPL or otherwise.

Using R as the basis for a web based application (eg. ASP, SaaS) is not
covered under GPL version *2*, which is how R is presently licensed.

However GPL *3*, strictly speaking the GNU Affero GPL version 3, DOES
cover such circumstances. If the R Foundation or other R package
contributors should modify their current licensing approach, this might
come into play and you need to consider that if you plan to move forward
with such a business model. You would need to consider where your value
proposition is. In the intellectual property or in the value add service?

More information is here:

http://www.gnu.org/licenses/quick-guide-gplv3.html

http://www.gnu.org/licenses/agpl.html

http://www.gnu.org/licenses/gpl-faq.html#UnreleasedMods

http://www.gnu.org/licenses/gpl-faq.html#AGPLv3InteractingRemotely

HTH,

Marc Schwartz

______________________________________________
[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: running R-code outside of R

esmail
In reply to this post by Spencer Graves
Spencer Graves wrote:
>      If you want to hide the fact that you are using R -- especially if
> you charge people for your software that uses R clandestinely -- that's
> a violation of the license (GPL).  

No on both accounts .. but thanks for pointing this out none the less.

______________________________________________
[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: running R-code outside of R

Daniel Folkinshteyn-2
In reply to this post by Ramon Diaz-Uriarte-2
>> If I analyze a client's data using an R script I created then I can
>> charge the client a $20,000 consulting fee, but, if I let the client
>> push the button to execute the R script and charge him 10 cents for the
>> privilege then I can be sued for violating the GPL?  Or are my
>
> I think you cannot be sued for the second either.

just to be precise, you can be /sued/ for anything - the question is,
will the plaintiff win? :)

______________________________________________
[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: running R-code outside of R

Roger Leenders
In reply to this post by Gabor Grothendieck

Thanks to all of the responders. It looks like dreams may come true
after all :-)

The application is as follows. Respondents fill out a questionnaire that
has been posted online. Output is in excel or text format. My client
(typically working for a government agency that provides subsidies to
SME businesses) then needs to send those data through the R code. The
code produces all kinds of output: probabilities, tables, several
figures, that together should be output in a pdf file. The client
typically will neither know about R nor will want to know about the
mechanics of the software that produces the output from the data.
The best thing would be if the client could press a button on the
website, which would then trigger the data processing and produce the
report for the client. Alternatively, we could give them software that
they could install on their own computers. Rpad or Rwui may just do the
trick!

thanks, Roger


Gabor Grothendieck schreef:

> You can set up a web site and have them use that.  Then they
> just need a browser.
>
> See www.rpad.org for one way or develop an internal or external site
> using any technology you know and call R on the back end.
>
> On Tue, Jun 24, 2008 at 2:01 PM, Roger Leenders <[hidden email]> wrote:
>  
>> R 2.7.0, WinXP
>>
>> Hi list,
>>
>> I have written some code in R that I would like to share with others who
>> are not R-users. Is there a way to compile the code so it will run
>> outside of R?
>> The best thing would be a functionality to compile the code into a ".exe"
>> file that does not require the user to have R installed or to know how to
>> use R. The persons I would like to make the program available to are
>> unlikely to ever need or use software like R.
>>
>> Is there a functionality that will allow others to use my code without
>> needing R itself?
>>
>> thanks, roger
>>
>> ______________________________________________
>> [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.