I'd like to know how to learn the R language as as 'programming' language as opposed to learning it as a statistical system. My question is prompted by lack of understanding of such functions as parse, eval, etc. which may not find frequent use by an R user with a 'statistics' persuasion.
我想知道如何将R语言作为“编程”语言学习,而不是把它作为一个统计系统来学习。我的问题是由于缺乏对解析、eval等函数的理解,而这些函数对于具有“统计”说服力的R用户来说可能并不常用。
Edit: I've been exploring such tools like Rpy RSPerl rJava and wish to (at the very least) be able to understand concepts that facilitate R's communication with other programming languages.
编辑:我一直在探索Rpy RSPerl rJava之类的工具,并希望(至少)能够理解有助于R与其他编程语言通信的概念。
The availability of Web applications for R (R-PHP, RApache, etc.) is another motivationg factor for me to gain a deeper, more structural understanding of R.
对于R (R- php、RApache等)来说,Web应用程序的可用性是另一个促使我对R有更深层次、更结构化理解的因素。
Last but not the least, I'd like to be able to write R packages for which such understanding would be beneficial if not necessary.
最后但并非最不重要的是,我希望能够编写R包,如果没有必要的话,这样的理解将是有益的。
4 个解决方案
#1
84
For starters, you might want to look at this article by John Cook. Also make sure that you read "The R Inferno".
首先,你可能想看看约翰·库克的这篇文章。还要确保你读过《地狱》。
There are many good resources on the R homepage, but in particular, read "An Introduction to R" and "The R Language Definition".
在R主页上有很多很好的资源,尤其是阅读“R的介绍”和“R的语言定义”。
Some very closely related * questions:
一些非常密切相关的*问题:
- books-for-learning-the-r-language.
- books-for-learning-the-r-language。
- what-are-some-good-books-web-resources-and-projects-for-learning-r
- what-are-some-good-books-web-resources-and-projects-for-learning-r
- suggestions-on-way-resources-to-start-learning-statistical-language-r
- suggestions-on-way-resources-to-start-learning-statistical-language-r
My favorite book on the subject: "Software for Data Analysis: Programming with R", by John Chambers, the creator of the S language.
我最喜欢的一本书是《数据分析软件:R》,作者是约翰·钱伯斯,他是S语言的创造者。
#2
22
A good book for learning R-as-a-programming-language (as opposed to R-for-statistics) is The Art of R Programming, by Norman Matloff.
一本学习R-as- A - Programming -language(而不是R-for-statistics)的好书,是Norman Matloff写的R- Programming。
It's very readable, doesn't assume you're a computer scientist, and is quite inexpensive as R books go.
它非常易读,不会假设你是一个计算机科学家,而且像R书一样很便宜。
#3
17
I would rather suggest a good and comprehensive start, like The R Book by Michael Crawley. It's an easy-to-read and complete book on R core functions, with statistical tips and a few exercises. It focuses a lot on R strengths (e.g. linear models) and gives also useful coding tricks. It helped me a lot while I was struggling on cryptic online courses.
我宁愿建议一个好的和全面的开始,就像Michael Crawley写的R书。这是一本关于R核心功能的易于阅读和完整的书,有统计提示和一些练习。它着重于R的优势(例如线性模型),并给出了有用的编码技巧。当我在神秘的在线课程上苦苦挣扎时,它给了我很多帮助。
#4
14
I'm a very hands-on learner, so this advice may be specific to my learning style. I would suggest that the best place to start "learning to program" in any language involves finding problems outside of your normal range of experience and then trying to solve them using a programming language.
我是一个很会动手的学习者,所以这个建议可能是针对我的学习风格的。我建议,用任何一种语言开始“学习编程”的最好地方,都是在你的常规经验范围之外找到问题,然后尝试用一种编程语言来解决它们。
The projects that taught me the most about how to program with R
had nothing to do with statistics at all.
那些教我如何用R编程的项目与统计一点关系都没有。
Knowing functions like parse()
and eval()
is by no means a measure for being "a good R programmer". Applications that require heavy use of these functions do not make up a majority of the problem space in which you can apply R
. Instead, I think you should try to be "a good programmer" who knows R
. This involves refining your problem-solving approaches.
了解诸如parse()和eval()之类的函数绝不是“优秀的R程序员”的标准。需要大量使用这些功能的应用程序并不构成您可以应用r的大部分问题空间,相反,我认为您应该试着成为一个“优秀的程序员”,谁知道r呢?这需要改进解决问题的方法。
Programming is not a spectator sport-- a good book is indispensable as a reference on the tools available, but you need to find some problems upon which to hone your skills.
编程并不是一项观赏性的运动——一本好书作为可用工具的参考是必不可少的,但是您需要找到一些问题来磨练您的技能。
#1
84
For starters, you might want to look at this article by John Cook. Also make sure that you read "The R Inferno".
首先,你可能想看看约翰·库克的这篇文章。还要确保你读过《地狱》。
There are many good resources on the R homepage, but in particular, read "An Introduction to R" and "The R Language Definition".
在R主页上有很多很好的资源,尤其是阅读“R的介绍”和“R的语言定义”。
Some very closely related * questions:
一些非常密切相关的*问题:
- books-for-learning-the-r-language.
- books-for-learning-the-r-language。
- what-are-some-good-books-web-resources-and-projects-for-learning-r
- what-are-some-good-books-web-resources-and-projects-for-learning-r
- suggestions-on-way-resources-to-start-learning-statistical-language-r
- suggestions-on-way-resources-to-start-learning-statistical-language-r
My favorite book on the subject: "Software for Data Analysis: Programming with R", by John Chambers, the creator of the S language.
我最喜欢的一本书是《数据分析软件:R》,作者是约翰·钱伯斯,他是S语言的创造者。
#2
22
A good book for learning R-as-a-programming-language (as opposed to R-for-statistics) is The Art of R Programming, by Norman Matloff.
一本学习R-as- A - Programming -language(而不是R-for-statistics)的好书,是Norman Matloff写的R- Programming。
It's very readable, doesn't assume you're a computer scientist, and is quite inexpensive as R books go.
它非常易读,不会假设你是一个计算机科学家,而且像R书一样很便宜。
#3
17
I would rather suggest a good and comprehensive start, like The R Book by Michael Crawley. It's an easy-to-read and complete book on R core functions, with statistical tips and a few exercises. It focuses a lot on R strengths (e.g. linear models) and gives also useful coding tricks. It helped me a lot while I was struggling on cryptic online courses.
我宁愿建议一个好的和全面的开始,就像Michael Crawley写的R书。这是一本关于R核心功能的易于阅读和完整的书,有统计提示和一些练习。它着重于R的优势(例如线性模型),并给出了有用的编码技巧。当我在神秘的在线课程上苦苦挣扎时,它给了我很多帮助。
#4
14
I'm a very hands-on learner, so this advice may be specific to my learning style. I would suggest that the best place to start "learning to program" in any language involves finding problems outside of your normal range of experience and then trying to solve them using a programming language.
我是一个很会动手的学习者,所以这个建议可能是针对我的学习风格的。我建议,用任何一种语言开始“学习编程”的最好地方,都是在你的常规经验范围之外找到问题,然后尝试用一种编程语言来解决它们。
The projects that taught me the most about how to program with R
had nothing to do with statistics at all.
那些教我如何用R编程的项目与统计一点关系都没有。
Knowing functions like parse()
and eval()
is by no means a measure for being "a good R programmer". Applications that require heavy use of these functions do not make up a majority of the problem space in which you can apply R
. Instead, I think you should try to be "a good programmer" who knows R
. This involves refining your problem-solving approaches.
了解诸如parse()和eval()之类的函数绝不是“优秀的R程序员”的标准。需要大量使用这些功能的应用程序并不构成您可以应用r的大部分问题空间,相反,我认为您应该试着成为一个“优秀的程序员”,谁知道r呢?这需要改进解决问题的方法。
Programming is not a spectator sport-- a good book is indispensable as a reference on the tools available, but you need to find some problems upon which to hone your skills.
编程并不是一项观赏性的运动——一本好书作为可用工具的参考是必不可少的,但是您需要找到一些问题来磨练您的技能。