Re: [R] OT: any recommendation for scripting language

2006-12-31 Thread Doran, Harold
I'm a bit new with python, but have found it extremely easy to learn and
use. I have been using it to pre-process some text files that we often
deal with and need to be formatted in a certain way before they can be
used for statistical analysis in another software program.

I suppose there is one thing I've learned that can make python a bit
more useful than R. It is possible to use Freeze to make your python
programs stand alone executables. So, if you have any need to have a
non-programmer replicate something easily, you can write a python
program and even make a GUI with Tkinter that will work on any platform
(as I understand it). 

Just the other day, a colleague and I wrote programs to process a text
file. His was SAS and mine was python and both gave the same end result.
My python code was about 4 lines long whereas his SAS code was
ridiculously long and hard to understand. We settled a bet than python
is better for this kind of stuff.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Wensui Liu
 Sent: Saturday, December 30, 2006 6:28 PM
 To: r-help@stat.math.ethz.ch
 Subject: Re: [R] OT: any recommendation for scripting language
 
 Dear Experts,
 
 Thank you so much for your opinions. I probably will go with python.
 
 Following your suggestion, I started reading some tutorials 
 but have a quick question. In the sense of statistical 
 computing, is there anything that can be easily done with 
 python but not with SAS/R? Could you please give such an example?
 
 Wish you all have a happy new year!
 
 wensui
 
 On 12/23/06, Wensui Liu [EMAIL PROTECTED] wrote:
  Right now, I am using SAS and S+/R. As a new year resolution, I am 
  planning to learn a scripting language.
 
  from statisticians' point of view, which scripting language 
 is worth 
  to learn, perl, python, or any other recommendation? (Most 
 likely, I 
  will be learning it in windows.) Since I am not in research, I will 
  prefer one widely used in industry and related to statistical work.
 
  if you recommend one, I will really appreciate it if you 
 could point 
  out a good source for learning as well.
 
  thank you so much!
 
  Have a happy holiday.
 
  wensui
 
 
 
 --
 WenSui Liu
 A lousy statistician who happens to know a little programming
 (http://spaces.msn.com/statcompute/blog)
 
 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-30 Thread Wensui Liu
Dear Experts,

Thank you so much for your opinions. I probably will go with python.

Following your suggestion, I started reading some tutorials but have a
quick question. In the sense of statistical computing, is there
anything that can be easily done with python but not with SAS/R? Could
you please give such an example?

Wish you all have a happy new year!

wensui

On 12/23/06, Wensui Liu [EMAIL PROTECTED] wrote:
 Right now, I am using SAS and S+/R. As a new year resolution, I am
 planning to learn a scripting language.

 from statisticians' point of view, which scripting language is worth
 to learn, perl, python, or any other recommendation? (Most likely, I
 will be learning it in windows.) Since I am not in research, I will
 prefer one widely used in industry and related to statistical work.

 if you recommend one, I will really appreciate it if you could point
 out a good source for learning as well.

 thank you so much!

 Have a happy holiday.

 wensui



-- 
WenSui Liu
A lousy statistician who happens to know a little programming
(http://spaces.msn.com/statcompute/blog)

__
R-help@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-30 Thread BBands
On 12/30/06, Wensui Liu [EMAIL PROTECTED] wrote:
 Dear Experts,

 Thank you so much for your opinions. I probably will go with python.

 Following your suggestion, I started reading some tutorials but have a
 quick question. In the sense of statistical computing, is there
 anything that can be easily done with python but not with SAS/R? Could
 you please give such an example?

I gather that just about anything can be done in R and have seen some
pretty amazing examples, but I come from the right tool for the job
school as contrasted to the when you have a hammer everything begins
to look like a nail school. As a consequence I tend to use R for
statistics, SQL for database management, gnuplot for graphics and
Python for general programming and glue... A lot of that has to do
with the order in which I learned the tools, for example I am much
faster/more productive with gnuplot than with R graphics, but that gap
is narrowing as I climb R's grade.

jab--not an expert, just a traveller
-- 
John Bollinger, CFA, CMT
www.BollingerBands.com

If you advance far enough, you arrive at the beginning.

__
R-help@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-30 Thread Gabor Grothendieck
Its easier to write command line filters using perl/python/gawk than R.
Its possible in R but awkward as there is no good way (platform
independent,easy to use) of referring to stdin data.

Something as simple as

gawk 1

which just copies its input to its output is pretty awkward in R.  What
R really needs is the ability to write:

R -f myprog.R  myinput.dat  myoutput.data

and have myprog.R refer to myinput.dat via /dev/stdin .


On 12/30/06, Wensui Liu [EMAIL PROTECTED] wrote:
 Dear Experts,

 Thank you so much for your opinions. I probably will go with python.

 Following your suggestion, I started reading some tutorials but have a
 quick question. In the sense of statistical computing, is there
 anything that can be easily done with python but not with SAS/R? Could
 you please give such an example?

 Wish you all have a happy new year!

 wensui

 On 12/23/06, Wensui Liu [EMAIL PROTECTED] wrote:
  Right now, I am using SAS and S+/R. As a new year resolution, I am
  planning to learn a scripting language.
 
  from statisticians' point of view, which scripting language is worth
  to learn, perl, python, or any other recommendation? (Most likely, I
  will be learning it in windows.) Since I am not in research, I will
  prefer one widely used in industry and related to statistical work.
 
  if you recommend one, I will really appreciate it if you could point
  out a good source for learning as well.
 
  thank you so much!
 
  Have a happy holiday.
 
  wensui
 


 --
 WenSui Liu
 A lousy statistician who happens to know a little programming
 (http://spaces.msn.com/statcompute/blog)

 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-29 Thread Mike Prager
Wensui Liu [EMAIL PROTECTED] wrote:

 Right now, I am using SAS and S+/R. As a new year resolution, I am
 planning to learn a scripting language.
 
 from statisticians' point of view, which scripting language is worth
 to learn, perl, python, or any other recommendation? (Most likely, I
 will be learning it in windows.) Since I am not in research, I will
 prefer one widely used in industry and related to statistical work.

I would second the recommendation by John Bollinger to look into
Python.  I haven't used Ruby, so I can't compare the two
languages, but compared to Perl, Python has is considerably
easier to understand and maintain. The language is widely used
and is available on several platforms.   The Python Web site
includes tutorials, and the download includes an IDE with an
interface to extensive help files.

http://www.python.org/


-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

__
R-help@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-24 Thread BBands
On 12/23/06, Wensui Liu [EMAIL PROTECTED] wrote:
 if you recommend one, I will really appreciate it if you could point
 out a good source for learning as well.

We have found Python to be the perfect choice for our work. Python is
a high-level, cross-platform language that is easy to learn/write with
an extensive set of libraries. It supports object and procedural
programming styles equally well, so one may match the style to the
task. If is also an excellent 'glue' language, easily tying together
diverse programs in various environments.   There is great
connectivity with R though rpy and RSpython. Here are links to some of
the connectors we use:

R
http://rpy.sourceforge.net/
http://www.omegahat.org/RSPython/
Database
http://sourceforge.net/projects/mysql-python
http://www.initd.org/tracker/pysqlite
Graphics
http://gnuplot-py.sourceforge.net/
Windows--COM, DDE...
http://sourceforge.net/projects/pywin32/

The Python tutorial is the place to start:

http://docs.python.org/tut/

 jab
-- 
John Bollinger, CFA, CMT
www.BollingerBands.com

If you advance far enough, you arrive at the beginning.

__
R-help@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-24 Thread Richard Graham
On 12/23/06, Wensui Liu [EMAIL PROTECTED] wrote:
 from statisticians' point of view, which scripting language is worth
 to learn, perl, python, or any other recommendation? (Most likely, I
 will be learning it in windows.) Since I am not in research, I will
 prefer one widely used in industry and related to statistical work.

It seems R would be the language of choice if you require related to
statistical work.  I would be surprised if any general scripting
language would restrict themselves to statistics.

 if you recommend one, I will really appreciate it if you could point
 out a good source for learning as well.

I find Ruby to be the closest language to the way I think about
programming.  It's fully object oriented, dynamically typed,
open-source, free, and runs on just about any platform.  Sophisticated
IDE's are available and it can also run easily from the command line
(like Perl).  Ruby is fun to use.

There are a lot of online Ruby resources and also printed material.
Here are just a few.

Language overview:
http://en.wikipedia.org/wiki/Ruby_%28programming_language%29

Main Website:
http://www.ruby-lang.org/en/

Learning Ruby:
http://pine.fm/LearnToProgram/
http://www.math.umd.edu/~dcarrera/ruby/0.3/index.html
http://poignantguide.net/ruby/

Give it a try online:
http://tryruby.hobix.com/

Book:
http://www.rubycentral.com/book/
[NB:  This free online book is for Ruby 1.6. Another printed and PDF
book is available for Ruby 1.8]
http://pragmaticprogrammer.com/titles/ruby/index.html

Newsgroup:
http://groups.google.com/group/comp.lang.ruby

 thank you so much!

Your welcome!

 Have a happy holiday.

Thank you, I am.  8-)  I hope everyone is having a nice holiday.

Richard Graham

__
R-help@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-23 Thread Wensui Liu
Right now, I am using SAS and S+/R. As a new year resolution, I am
planning to learn a scripting language.

from statisticians' point of view, which scripting language is worth
to learn, perl, python, or any other recommendation? (Most likely, I
will be learning it in windows.) Since I am not in research, I will
prefer one widely used in industry and related to statistical work.

if you recommend one, I will really appreciate it if you could point
out a good source for learning as well.

thank you so much!

Have a happy holiday.

wensui

__
R-help@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-23 Thread Gabor Grothendieck
I used gawk and perl prior to using R but as I got more proficient in
R I found I could do just about everything in R itself and have largely
forgotten perl at this point and rarely use gawk either.  I must say
I never liked perl and if python were more mature back then I
probably would have used that.

I do use Windows batch commands and javascript, e.g.
  http://code.google.com/p/batchfiles/
for situations where I want self contained, no dependency, installation
and configuration scripts; however, I don't really like Windows batch
commands and if it were not for the requirement of no dependencies
I would not use it.   This does have the disadvantage of not being
portable to other OSes but the no dependency requirement is
overriding in these situations.

Maybe if you could discuss what you intend to do more can be said.

On 12/23/06, Wensui Liu [EMAIL PROTECTED] wrote:
 Right now, I am using SAS and S+/R. As a new year resolution, I am
 planning to learn a scripting language.

 from statisticians' point of view, which scripting language is worth
 to learn, perl, python, or any other recommendation? (Most likely, I
 will be learning it in windows.) Since I am not in research, I will
 prefer one widely used in industry and related to statistical work.

 if you recommend one, I will really appreciate it if you could point
 out a good source for learning as well.

 thank you so much!

 Have a happy holiday.

 wensui


__
R-help@stat.math.ethz.ch 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] OT: any recommendation for scripting language

2006-12-23 Thread Jim Lemon
Wensui Liu wrote:
 Right now, I am using SAS and S+/R. As a new year resolution, I am
 planning to learn a scripting language.
 
 from statisticians' point of view, which scripting language is worth
 to learn, perl, python, or any other recommendation? (Most likely, I
 will be learning it in windows.) Since I am not in research, I will
 prefer one widely used in industry and related to statistical work.
 
 if you recommend one, I will really appreciate it if you could point
 out a good source for learning as well.
 
Hi Wensui,
I use Tcl-Tk quite a bit. I found it very easy to learn, and as you can 
see from the tcl-tk package in R, very flexible. It is particularly good 
at spanning the range from a slick-looking GUI to low level file and 
computation operations. I'm currently using it to pick individual 
records out of a database, calculate age and sex specific deviations 
from population norms and then present a graphical display to the user.

There is not only excellent documentation available for Tcl-Tk, but 
several newsgroups and wikis.

http://www.tcl.tk

Jim

__
R-help@stat.math.ethz.ch 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.