Re: [R] What makes R different from other programming languages?

2012-08-22 Thread Alexandre Aguiar
Hi.

Em Ter 21 Ago 2012, Mark Dalphin escreveu:
> I guess the other aspect which I take the most time to describe to any
> programmer from other more traditional languages is the working with
> vectors. To use R effectively, you must move data in large chunks; the
> standard paradigm of looping over the data is the fastest way to write
> a slow program.

That's what makes R kind of hybrid: both procedural and declarative. 
Declaring objects and its predicates and have all fully and efficiently 
processed without programming every single step may be shocking for those 
who only know the 'procedural way'. Except for the experience with SQL 
with which we do not write 'SQL programs', most programmers (including 
amateur programmers) never had contact with the declarative programming 
paradigm. Many may have never heard of Prolog, for instance.

Cheers.


-- 


Alexandre

--
Alexandre Santos Aguiar, MD, SCT

gpg public key: mailto:gpg...@asaguiar.net


signature.asc
Description: This is a digitally signed message part.
__
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.


Re: [R] What makes R different from other programming languages?

2012-08-22 Thread Jim Lemon

johannes rara  wrote:

My intention is to give a presentation about R programming language
for software developers. I would like to ask, what are the things that
make R different from other programming languages? What are the
specific cases where Java/C#/Python developer might say "Wow, that was
neat!"? What are the things that are easy in R, but very difficult in
other programming languages (like Java)?


Hi johannes,
Think of it as a classic work of cinematic art.

The Good

It's familiar. If you've programmed in C (or FORTRAN, APL,...) the 
syntax will be sufficiently familiar that the noob can begin doing 
useful things right away. Building functions is a natural step from 
using the numerous built in functions. It's easy to get started with the 
bits that are cool and fun, like graphics. I recall programming a 
psychological test in Tcl-Tk (which I like a great deal) and finding 
that even simple graphics were a lot more difficult than they are in R.


The Bad

It's not always what you expect. It is so easy to get started that most 
people will get tripped up by some neat feature of the underlying object 
oriented programming model. For a while, the more you learn, the more 
you have to learn.


The Ugly

You are almost encouraged to write sloppy spaghetti code, as most common 
problems will yield to monkey-search programming in R. Just stick things 
together until the answer comes out. That's the price you pay for The Good.


Jim

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-21 Thread Alexandre Aguiar
cbe...@tajo.ucsd.edu escreveu:
>"This rather unlikely linguistic cocktail would probably never have
>been prepared by computer scientists, yet the language has become
>surprisingly popular."


A linguist that is a good friend once observed that language is both expression 
and a modeller of how we think. No matter in which extent each one is true, the 
'expression' property has some compelling evidence in support: it has been 
demonstrated that human babies generate the same words and phonemes without 
regard to the culture of their parents, that is, everywhere babies generate a 
common babies' language.

In everyday life, each profession has its technical jargon and even a peculiar 
slang (not to mention the set of jokes :-) ). In computing, it is remarkable 
that different languages developed by the same person are extremely similar: 
Nicklaus Wirth's Pascal and Modula 2 have almost identical syntax, use the same 
function naming and  calling conventions, etc.

>From this angle, it does not look strange that R is peculiar and can even be 
>regarded as a new, more free paradigm with regard to control structures and 
>yet hold all the features of a structured language. And although a procedural 
>language there are some instances in which R resembles a declarative language 
>(IMHO, this could be extended, enhanced :-D).



--

Alexandre Aguiar, MD SCT
SPS Consultoria

-- 
Sent from my tablet. Please, excuse my brevity.
Enviado do tablet. Por favor, perdoe a brevidade.
Publié de le tablet. S'il vous plaît pardonnez la brièveté.
Veröffentlicht aus dem Tablet. Bitte verzeihen Sie die Kürze.
Enviado desde mi tablet. Por favor, disculpen mi brevedad.
Inviato dal mio tablet. Per favore, scusate la mia brevità.

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread cberry
johannes rara  writes:

> Thanks, the audience is mainly Java developers who develop tailored
> software for many domains. I think that they would like to have some
> answers to these kind of questions:
>
> - why should I learn R?
> - what are the specific use cases where one might think of using R?
> - in which area R is good for?
> - how R differ from other programming and scripting languages?
> - etc.

For that audience this might be a useful reference:

 http://www.springerlink.com/content/284141778194p522/


 Evaluating the Design of the R Language
 (Objects and Functions for Data Analysis)

 Floreal Morandat, Brandon Hill, Leo Osvald and Jan Vitek

>From the abstract:

"This rather unlikely linguistic cocktail would probably never have
been prepared by computer scientists, yet the language has become
surprisingly popular."

and 

"Using a combination of static and dynamic program analysis we assess
the success of different language features."

HTH,

Chuck

>
> My intention is to convince them so that they will try R on their own,
> and probably in some day start using R in their projects.
>
> Best regards,
> -J
>
> 2012/8/20 R. Michael Weylandt :
>> As a language, there are some nifty things about function arguments:
>> http://blog.moertel.com/articles/2006/01/20/wondrous-oddities-rs-function-call-semantics.
>> Lexical scoping +  first class functions also come to mind.
>>
>> If we are thinking about libraries, graphics:
>> http://addictedtor.free.fr/graphiques/ and look into ggplot2
>> (including the famous facebook world map) and statistical modelling
>> (both base and in contributed packages)
>>
>> What are your developers interested in and we can be more specific?
>>
>> Michael
>>
>> On Mon, Aug 20, 2012 at 1:02 PM, johannes rara  
>> wrote:
>>> My intention is to give a presentation about R programming language
>>> for software developers. I would like to ask, what are the things that
>>> make R different from other programming languages? What are the
>>> specific cases where Java/C#/Python developer might say "Wow, that was
>>> neat!"? What are the things that are easy in R, but very difficult in
>>> other programming languages (like Java)?
>>>
>>> Thanks,
>>> -J
>>>
>>> __
>>> 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.
>

-- 
Charles C. BerryDept of Family/Preventive Medicine
cberry at ucsd edu  UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread Mark Dalphin
I've read several replies to this question already and they seem to have
missed the one point that most irritated the Java programmers to whom I
tried to teach R. They HATED the "object-oriented" material, both S4 and
especially S3, as it did not match the style of OO programming that had
been pounded into them. The ones I tried to teach hated S3 and S4
methods so much, that some even refused to learn to learn them on the
grounds that they "weren't OO". Now it could easily have been my
approach as I was not well equipped at the time to "compare and
contrast", never the less, I would approach this aspect carefully as the
two approaches are so different.

I guess the other aspect which I take the most time to describe to any
programmer from other more traditional languages is the working with
vectors. To use R effectively, you must move data in large chunks; the
standard paradigm of looping over the data is the fastest way to write a
slow program. I find it takes a good long while for programmers to make
the switch to working with vectors (more than a month of use), but they
grasp the concept quickly and like it.

Cheers,
Mark

johannes rara wrote:
> My intention is to give a presentation about R programming language
> for software developers. I would like to ask, what are the things that
> make R different from other programming languages? What are the
> specific cases where Java/C#/Python developer might say "Wow, that was
> neat!"? What are the things that are easy in R, but very difficult in
> other programming languages (like Java)?
>
> Thanks,
> -J
>
> __
> 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.
>

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread R. Michael Weylandt
On Mon, Aug 20, 2012 at 5:57 PM, Greg Snow <538...@gmail.com> wrote:
> I think the big unique thing about R is that it is both an interactive
> environment and a programming language.  A new user can start it,
> enter some data, and compute same basic statics without ever
> "programming".  A more advanced user can write their own function to
> automate common procedures or implement an new method.  The journey
> from user to programmer is smoother that learning a macro language or
> API.
>
> Add to that the packages available (which could be programmed in other
> languages, but why?) and you have a very useful tool.

And note that the "rJava" package allows both way communications
between R and Java (I'm ~95% sure and that seems to be all
statisticians care about ;-) ) so your Java programmers can take
advantage of R's libraries too.

http://www.rforge.net/rJava/

Cheers,
Michael

>
> On Mon, Aug 20, 2012 at 1:22 PM, johannes rara  wrote:
>> Thanks, the audience is mainly Java developers who develop tailored
>> software for many domains. I think that they would like to have some
>> answers to these kind of questions:
>>
>> - why should I learn R?
>> - what are the specific use cases where one might think of using R?
>> - in which area R is good for?
>> - how R differ from other programming and scripting languages?
>> - etc.
>>
>> My intention is to convince them so that they will try R on their own,
>> and probably in some day start using R in their projects.
>>
>> Best regards,
>> -J
>>
>> 2012/8/20 R. Michael Weylandt :
>>> As a language, there are some nifty things about function arguments:
>>> http://blog.moertel.com/articles/2006/01/20/wondrous-oddities-rs-function-call-semantics.
>>> Lexical scoping +  first class functions also come to mind.
>>>
>>> If we are thinking about libraries, graphics:
>>> http://addictedtor.free.fr/graphiques/ and look into ggplot2
>>> (including the famous facebook world map) and statistical modelling
>>> (both base and in contributed packages)
>>>
>>> What are your developers interested in and we can be more specific?
>>>
>>> Michael
>>>
>>> On Mon, Aug 20, 2012 at 1:02 PM, johannes rara  
>>> wrote:
 My intention is to give a presentation about R programming language
 for software developers. I would like to ask, what are the things that
 make R different from other programming languages? What are the
 specific cases where Java/C#/Python developer might say "Wow, that was
 neat!"? What are the things that are easy in R, but very difficult in
 other programming languages (like Java)?

 Thanks,
 -J

 __
 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.
>>
>> __
>> 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.
>
>
>
> --
> Gregory (Greg) L. Snow Ph.D.
> 538...@gmail.com

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread Greg Snow
I think the big unique thing about R is that it is both an interactive
environment and a programming language.  A new user can start it,
enter some data, and compute same basic statics without ever
"programming".  A more advanced user can write their own function to
automate common procedures or implement an new method.  The journey
from user to programmer is smoother that learning a macro language or
API.

Add to that the packages available (which could be programmed in other
languages, but why?) and you have a very useful tool.

On Mon, Aug 20, 2012 at 1:22 PM, johannes rara  wrote:
> Thanks, the audience is mainly Java developers who develop tailored
> software for many domains. I think that they would like to have some
> answers to these kind of questions:
>
> - why should I learn R?
> - what are the specific use cases where one might think of using R?
> - in which area R is good for?
> - how R differ from other programming and scripting languages?
> - etc.
>
> My intention is to convince them so that they will try R on their own,
> and probably in some day start using R in their projects.
>
> Best regards,
> -J
>
> 2012/8/20 R. Michael Weylandt :
>> As a language, there are some nifty things about function arguments:
>> http://blog.moertel.com/articles/2006/01/20/wondrous-oddities-rs-function-call-semantics.
>> Lexical scoping +  first class functions also come to mind.
>>
>> If we are thinking about libraries, graphics:
>> http://addictedtor.free.fr/graphiques/ and look into ggplot2
>> (including the famous facebook world map) and statistical modelling
>> (both base and in contributed packages)
>>
>> What are your developers interested in and we can be more specific?
>>
>> Michael
>>
>> On Mon, Aug 20, 2012 at 1:02 PM, johannes rara  
>> wrote:
>>> My intention is to give a presentation about R programming language
>>> for software developers. I would like to ask, what are the things that
>>> make R different from other programming languages? What are the
>>> specific cases where Java/C#/Python developer might say "Wow, that was
>>> neat!"? What are the things that are easy in R, but very difficult in
>>> other programming languages (like Java)?
>>>
>>> Thanks,
>>> -J
>>>
>>> __
>>> 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.
>
> __
> 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.



-- 
Gregory (Greg) L. Snow Ph.D.
538...@gmail.com

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread johannes rara
Thanks, the audience is mainly Java developers who develop tailored
software for many domains. I think that they would like to have some
answers to these kind of questions:

- why should I learn R?
- what are the specific use cases where one might think of using R?
- in which area R is good for?
- how R differ from other programming and scripting languages?
- etc.

My intention is to convince them so that they will try R on their own,
and probably in some day start using R in their projects.

Best regards,
-J

2012/8/20 R. Michael Weylandt :
> As a language, there are some nifty things about function arguments:
> http://blog.moertel.com/articles/2006/01/20/wondrous-oddities-rs-function-call-semantics.
> Lexical scoping +  first class functions also come to mind.
>
> If we are thinking about libraries, graphics:
> http://addictedtor.free.fr/graphiques/ and look into ggplot2
> (including the famous facebook world map) and statistical modelling
> (both base and in contributed packages)
>
> What are your developers interested in and we can be more specific?
>
> Michael
>
> On Mon, Aug 20, 2012 at 1:02 PM, johannes rara  wrote:
>> My intention is to give a presentation about R programming language
>> for software developers. I would like to ask, what are the things that
>> make R different from other programming languages? What are the
>> specific cases where Java/C#/Python developer might say "Wow, that was
>> neat!"? What are the things that are easy in R, but very difficult in
>> other programming languages (like Java)?
>>
>> Thanks,
>> -J
>>
>> __
>> 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.

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread Bert Gunter
I think you would find it more useful to take a look at John Chambers'
book: Software for Data Analysis: Programming with R.  Much more
authoritative and comprehensive than you are likely to get here.

-- Bert

On Mon, Aug 20, 2012 at 11:02 AM, johannes rara  wrote:
> My intention is to give a presentation about R programming language
> for software developers. I would like to ask, what are the things that
> make R different from other programming languages? What are the
> specific cases where Java/C#/Python developer might say "Wow, that was
> neat!"? What are the things that are easy in R, but very difficult in
> other programming languages (like Java)?
>
> Thanks,
> -J
>
> __
> 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.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread R. Michael Weylandt
As a language, there are some nifty things about function arguments:
http://blog.moertel.com/articles/2006/01/20/wondrous-oddities-rs-function-call-semantics.
Lexical scoping +  first class functions also come to mind.

If we are thinking about libraries, graphics:
http://addictedtor.free.fr/graphiques/ and look into ggplot2
(including the famous facebook world map) and statistical modelling
(both base and in contributed packages)

What are your developers interested in and we can be more specific?

Michael

On Mon, Aug 20, 2012 at 1:02 PM, johannes rara  wrote:
> My intention is to give a presentation about R programming language
> for software developers. I would like to ask, what are the things that
> make R different from other programming languages? What are the
> specific cases where Java/C#/Python developer might say "Wow, that was
> neat!"? What are the things that are easy in R, but very difficult in
> other programming languages (like Java)?
>
> Thanks,
> -J
>
> __
> 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.

__
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.


Re: [R] What makes R different from other programming languages?

2012-08-20 Thread Matthias Gondan

My vote:

1. Symbolic function arguments:

fn = function(a, b)
{
a/b
}

fn(b=10, a=2)

2. Names for elements of a vector and matrices

v = c(a=1, b=2)
v['a'] = v['a'] * 2

same for matrices

3. about 10,000 user-contributed packages on CRAN

4. weird things like

a = numeric(10)
a[1:10] = 1:2

a
answer: five times 1:2

which guarantee happy debugging

5. and, of course, much built-in statistical stuff


Am 20.08.2012 20:02, schrieb johannes rara:

My intention is to give a presentation about R programming language
for software developers. I would like to ask, what are the things that
make R different from other programming languages? What are the
specific cases where Java/C#/Python developer might say "Wow, that was
neat!"? What are the things that are easy in R, but very difficult in
other programming languages (like Java)?

Thanks,
-J

__
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.


__
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.