In my job I write custom computer programs for data analysis, which are used in our company's consulting business. Whenever I've needed statistical analyses I've coded the algorithms myself, but my boss wants me to start learning and using R, to speed up development. I am very reluctuant to do this because I can't find adequate *programming* documentation for R (though I can find a lot of inadequate documentation). As far as I can tell, the R documentation may be adequate for end-users who don't plan to do much programming (if any at all), but it is completely unacceptable from the standpoint of programming. In a couple of simple exploratory projects I have been reduced to programming by *trial and error*. For example, I just spent a couple of fruitless hours trying to find information on how to modify a list (all my ***guesses*** have failed; they either produce results different from what I want, or generate errors such as "replacing element in non-existent column"). How much fundamental basic can one get in the documentation of a programming language than this sort of information?[1] This is just one of many examples. My R code is filled with crude hacks that I don't understand, and that I stumbled upon in blind scrambles to get my code to work. How can I possible stand by the results of my R scripts if they are the product of sheer guesswork? I even bought the R Reference Manual, vols. 1 and 2, and deeply regret it, since they are nothing other than a hardcopy of the online manual pages[1]. This is no substitute for a reference of the R language and how to program it. Is my impression correct that R is simply not well-documented enough for serious programming? Have I missed a key reference to programming R? To those of you who do a lot of programming in R (other than those who are members of the R Development team, of course): what references do you consult on questions about the programming language itself (as opposed to this or that library function)? Thanks! kj [1] A massive tome that I have called S-Plus 2000 Programmer's guide has *nothing* on the subject. Unbelievable! 900 pages and not a word on how one modifies a basic data type. [2] This, BTW, was a *big* waste of money. I'm all for supporting open source development, and often buy hardcopy manuals of free software precisely for this reason, but for what I got in return for my 100 USD, I'd been far better off sending directly to the R Foundation the pittance that the publishers of the manual pass on to it. P.S. I'm aware of Introduction to R; this is OK as a tutorial, particularly for end users, but by itself utterly inadequate as a reference to the R language.
R Language Definition Writing R Extensions 1988 S book (the "Blue Book") 1992 S book (the "White Book") S programing Programing with data 仯仺about S4仯仼 ======= 2005-10-17 19:36:48 伳侜佋佢伬伌佇伵佒佇佇伌伒伬仯伜======> > > > >In my job I write custom computer programs for data analysis, which >are used in our company's consulting business. Whenever I've needed >statistical analyses I've coded the algorithms myself, but my boss >wants me to start learning and using R, to speed up development. > >I am very reluctuant to do this because I can't find adequate >*programming* documentation for R (though I can find a lot of >inadequate documentation). As far as I can tell, the R documentation >may be adequate for end-users who don't plan to do much programming >(if any at all), but it is completely unacceptable from the standpoint >of programming. > >In a couple of simple exploratory projects I have been reduced to >programming by *trial and error*. For example, I just spent a couple >of fruitless hours trying to find information on how to modify a list >(all my ***guesses*** have failed; they either produce results >different from what I want, or generate errors such as "replacing >element in non-existent column"). How much fundamental basic can one >get in the documentation of a programming language than this sort of >information?[1] This is just one of many examples. My R code is filled >with crude hacks that I don't understand, and that I stumbled upon in >blind scrambles to get my code to work. How can I possible stand by >the results of my R scripts if they are the product of sheer >guesswork? > >I even bought the R Reference Manual, vols. 1 and 2, and deeply regret >it, since they are nothing other than a hardcopy of the online manual >pages[1]. This is no substitute for a reference of the R language and >how to program it. > >Is my impression correct that R is simply not well-documented enough >for serious programming? Have I missed a key reference to programming >R? To those of you who do a lot of programming in R (other than those >who are members of the R Development team, of course): what references >do you consult on questions about the programming language itself (as >opposed to this or that library function)? > >Thanks! > >kj > >[1] A massive tome that I have called S-Plus 2000 Programmer's guide >has *nothing* on the subject. Unbelievable! 900 pages and not a word >on how one modifies a basic data type. > >[2] This, BTW, was a *big* waste of money. I'm all for supporting >open source development, and often buy hardcopy manuals of free >software precisely for this reason, but for what I got in return for >my 100 USD, I'd been far better off sending directly to the R >Foundation the pittance that the publishers of the manual pass on to >it. > >P.S. I'm aware of Introduction to R; this is OK as a tutorial, >particularly for end users, but by itself utterly inadequate as a >reference to the R language. > >______________________________________________ >R-help at 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= = = = = = = = = = = = = = = = = = = 2005-10-17 ------ Deparment of Sociology Fudan University My new mail addres is ronggui.huang at gmail.com Blog:http://sociology.yculblog.com
KJ,>In my job I write custom computer programs for data analysis, which >are used in our company's consulting business. Whenever I've needed >statistical analyses I've coded the algorithms myself, but my boss >wants me to start learning and using R, to speed up development. >I'm curious as to what language you usually use. That might help us help you in terms of language differences.>I am very reluctuant to do this because I can't find adequate >*programming* documentation for R (though I can find a lot of >inadequate documentation). As far as I can tell, the R documentation >may be adequate for end-users who don't plan to do much programming >(if any at all), but it is completely unacceptable from the standpoint >of programming. >While I would agree that almost every statistical programming language spend more time on context-specific information (e.g. here's the code to get a regression line) than good coding practices (program design and layout), I think that you've misjudged the documentation. Sources to learn (in no particular order): 1). S programming by Venables and Ripley, especially section 7.7 2). The code itself! Download the sources from cran (I believe the installed packages have comments stripped). There is a ton of code out there and you will learn just as much from the great code examples as you will from the bad ones (and there are some bad ones). 3). The manuals at http://cran.r-project.org/manuals.html. For example, your list subscripting solution is plainly demonstrated in section 6.1: "Thus if Lst is the name of a list with four components, these may be individually referred to as Lst[[1]], Lst[[2]] ..." 4). Package vignettes. There are many packages with doc directories with pdf documents that explain some of the nuances of the package. This will help you learn the language. 5). For "questions about the programming language itself" it would seem like the R Language Definition manual might go a long way. 6). This list already contains many answers to common questions 7). Misc web sites: - the site listed in http://www.bioconductor.org/workshops/ typically have sections for an introduction to R - Dr. Harrell's site at http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/ - JHU's statistical computing class: http://www.biostat.jhsph.edu/~bcaffo/statcomp/ - google 8). R news, http://cran.r-project.org/doc/Rnews, has two sections that may be of interest "Programmer's Niche: nifty hints for programming in R (or S)" and "Hints for newcomers: Explaining sides of R that might not be so obvious from reading the manuals and FAQs." 9). The useR conferences have presentations that might be of interest to you: http://www.ci.tuwien.ac.at/Conferences/useR-2004/. I would check out the keynote lecture by Martin M??chler.>In a couple of simple exploratory projects I have been reduced to >programming by *trial and error*. For example, I just spent a couple >of fruitless hours trying to find information on how to modify a list >(all my ***guesses*** have failed; they either produce results >different from what I want, or generate errors such as "replacing >element in non-existent column"). How much fundamental basic can one >get in the documentation of a programming language than this sort of >information?[1] This is just one of many examples. My R code is filled >with crude hacks that I don't understand, and that I stumbled upon in >blind scrambles to get my code to work. How can I possible stand by >the results of my R scripts if they are the product of sheer >guesswork? >Remember that R is a language created, maintain and grown by volunteers. There is no company that pays people to write copious amounts of documentation (like SAS, S-Plus, Java etc). I think that if you are going to use R, you should accept the limitations that you perceive - and honestly, I don't think that you've put enough effort into learning it. If you do get stuck, search R-help, read the posting guide, compose an email with a very specific question, read the posting guide again and send it in. (and since they are volunteers, you should also be nice to them.)>I even bought the R Reference Manual, vols. 1 and 2, and deeply regret<snip> Max Kuhn Associate Director Nonclinical Statistics Pfizer Global R&D ---------------------------------------------------------------------- LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
Hi I do not make "programs" in R to be available for others to use. But I **do** analyse data and make some conclusions from such analysis. And if I have to analyse the same data every (day, week, month, year) I prepare a "program" (function or several functions) to be able in few strokes or in batch mode to do my whole analysis repeatedly. I find documentation provided and suggested quite satisfactory and, if I am lost, I always can ask this list. So if you want to do programs for others I do not have opinion and you need not read the rest of this. But if the second aspect is what you want, (you have data and you want to do an analysis) I am pretty sure that you just missed the basics of data manipulation in R. I learned BASIC (quite long ago), used punched paper tapes for storing data and did some programming in various languages (although I am not a programmer) and the main difference I perceive is extensive use of operations on whole objects in R. Forget to do for-next cycle for simple filling some data vector or matrix (at least most of the time). read data -> modify, subset them -> issue a build in or prepared function and store results in some object -> use another function on this object to find out some other features of the object or simply make some plotting....etc. So you need to learn the language and bear in mind that many statistical analysis is pre-programmed in it and its packages. But it of course depends on if you really want to learn it or not. If you don't nobody can help you. I found particularly useful: zoonek2.free.fr/UNIX/48_R/02.html www.ku.edu/~pauljohn/R/Rtips.html www.psych.upenn.edu/~baron/refcard.pdf Using R for Data Analysis and Graphics Introduction, Code and Commentary J H Maindonald http://www.ats.ucla.edu/stat/R/sk/books_usingr.htm And of course many other specific documentation, mentioned in CRAN. Best regards Petr On 17 Oct 2005 at 7:36, kynn at panix.com wrote: Date sent: Mon, 17 Oct 2005 07:36:48 -0400 (EDT) From: <kynn at panix.com> To: r-help at stat.math.ethz.ch Subject: [R] ISO R-programming docs/refs > > > > > In my job I write custom computer programs for data analysis, which > are used in our company's consulting business. Whenever I've needed > statistical analyses I've coded the algorithms myself, but my boss > wants me to start learning and using R, to speed up development. > > I am very reluctuant to do this because I can't find adequate > *programming* documentation for R (though I can find a lot of > inadequate documentation). As far as I can tell, the R documentation > may be adequate for end-users who don't plan to do much programming > (if any at all), but it is completely unacceptable from the standpoint > of programming. > > In a couple of simple exploratory projects I have been reduced to > programming by *trial and error*. For example, I just spent a couple > of fruitless hours trying to find information on how to modify a list > (all my ***guesses*** have failed; they either produce results > different from what I want, or generate errors such as "replacing > element in non-existent column"). How much fundamental basic can one > get in the documentation of a programming language than this sort of > information?[1] This is just one of many examples. My R code is > filled with crude hacks that I don't understand, and that I stumbled > upon in blind scrambles to get my code to work. How can I possible > stand by the results of my R scripts if they are the product of sheer > guesswork? > > I even bought the R Reference Manual, vols. 1 and 2, and deeply regret > it, since they are nothing other than a hardcopy of the online manual > pages[1]. This is no substitute for a reference of the R language and > how to program it. > > Is my impression correct that R is simply not well-documented enough > for serious programming? Have I missed a key reference to programming > R? To those of you who do a lot of programming in R (other than those > who are members of the R Development team, of course): what references > do you consult on questions about the programming language itself (as > opposed to this or that library function)? > > Thanks! > > kj > > [1] A massive tome that I have called S-Plus 2000 Programmer's guide > has *nothing* on the subject. Unbelievable! 900 pages and not a word > on how one modifies a basic data type. > > [2] This, BTW, was a *big* waste of money. I'm all for supporting > open source development, and often buy hardcopy manuals of free > software precisely for this reason, but for what I got in return for > my 100 USD, I'd been far better off sending directly to the R > Foundation the pittance that the publishers of the manual pass on to > it. > > P.S. I'm aware of Introduction to R; this is OK as a tutorial, > particularly for end users, but by itself utterly inadequate as a > reference to the R language. > > ______________________________________________ > R-help at 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 Petr Pikal petr.pikal at precheza.cz
[A lot of polite and constructive critique deleted]> Is my impression correct that R is simply not well-documented enough > for serious programming?No.> Have I missed a key reference to programming R?Yes. How about reading the text that R displays when it starts (and follow its suggestions)? Or visiting the canonical web site for R (http://www.r-project.org/)? Or consulting question 2.7 in the R FAQ ("2.7 What documentation exists for R?") Or reading the posting guide for the list (http://www.R-project.org/posting-guide.html)? All four methods would (presumably) quickly have led you to manuals such as "the R Language Definition", "Writing R Extensions" and "R Data Import/Export", and given references to books on programming S and/or R. -- Bj??rn-Helge Mevik
Reasonably Related Threads
- isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
- isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
- isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
- Use z size specifier for printf-ing size_t variable
- [LLVMdev] New automated decision procedure for path-sensitive analysis