On 2018-03-14 11:52, Rich Shepard wrote:
On Wed, 14 Mar 2018, Duncan Murdoch wrote:
I'm all for learning more languages and using the one that's best for
each
job, but for people who don't know Python, it would be helpful to
list the
aspects in which it excels. When should an R user choose to write
something in Python instead?
Duncan,
"Best" is subjective, but my view is the language most comfortable and
familiar to the developer/analyst should be the one used.
In my environmental consulting business I use both R and Python. While
Python has support for many statistical models I'm more comfortable
with the
ones available in R. For spatial analyses (separate from spatial
statistics)
I've used GRASS for > 20 years and it heavily uses Python. I also use
Python
(along with emacs, awk, sed, and grep) for cleaning and organizing
data. For
writing, I use LaTeX (a markup language) and the LyX GUI front end.
Python has a lot of support for scientific and financial analyses,
as does
R. Considering there are a gazillion programming languages available (and
used for essential applications, such as GnuCash (written in guile, a
scheme
variant) which I use for business and personal bookkeeping, picking the
"best" one is strictly a personal matter. I prefer emacs, my system and
network admin friends prefer vi. In linux, at least, there are so many
options for doing a task that sometimes it's difficult to decide which to
use in a given situation.
If the languages you know do all you need then learn a new one only if
it's to scratch an itch. :-)
My software development productivity increased by a factor of
maybe 30 by using first S-Plus then R, including writing R packages,
then RStudio and writing Rmarkdown vignettes.
1. I started writing Fortran in 1963. I've written
assembly language for multiple machines, Cobol, Lisp, and other
language. I started using S-Plus in the early 1990s and abandoned it
for R when I needed "debug" for some S-Plus code. Developing R packages
improved my software development productivity by a factor of 10, because
the discipline of creating unit tests in "\examples" made it so much
easier to debug and maintain -- AND share with others.
2. I've also written some Python, though not much. I used
Emacs until I found RStudio. Vi and Emacs are not tools you can give to
someone, who is only marginally computer literate and expect them to be
productive in a reasonable period of time. By contrast, if someone
knows enough to be able to install R and RStudio, I can give them some R
code and be confident that they will get something useful from the
experience in a relatively short period of time. You can't do that with
vi and Emacs unless they already know those applications.
3. Recently, I've started writing RMarkdown vignettes, and
that further increased my productivity.
3.1. Two years ago, I told I client I was going to
prepare and Rmarkdown vignette to document what I did with their data.
My sales guy said absolutely, we were NOT going to give the client an
Rmarkdown vignette. I spent a week analyzing the data and 6 months
answering questions from the team mostly by pointing them to certain
lines in the vignette, occasionally by extending it. In the middle of
that, we learned that the client required our analysis to be
verifiable. After that, the vignette became a primary deliverable.
3.2. More recently, another client asked me to
explain principal components. This client was moderately facile with
software but not with R nor vector spaces. I gave him an Rmarkdown
vignette that included a principal components on some data he gave me
done both with a single command and step by step supplemented with a
simple discussion of a one-dimensional subspace of two-dimensional
space. He was happy.
4. I invite all to review and improve the discussion in
the Wikipedia article on "Software repository". This a table with a
discussion of "Selected repositories", much of which I wrote 8 years
ago. It's heavily biased toward CRAN, because that's what I know the
best, and I've so far been unable to find anyone with the expertise and
interest in improving it. This article averaged 290 views per day over
the past 90 days, over 26,000 in the past 3 months. If you can improve
that article, an audience that size might be worth talking to.
Spencer Graves
Best regards,
Rich
______________________________________________
R-help@r-project.org 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.
______________________________________________
R-help@r-project.org 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.