I have tried several times to "go it on my own" - but with limited success. I am a casual SPSS user and have some SAS experience.
Would appreciate a pointer or two from someone who has similar background and now uses R.
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.
Sign up to join this communityI have tried several times to "go it on my own" - but with limited success. I am a casual SPSS user and have some SAS experience.
Would appreciate a pointer or two from someone who has similar background and now uses R.
I think the only way to get into it is the next time you you need to do something in SAS or SPSS fire up R instead. It is tough at the beginning and at first you will spend a lot of time on simple tasks. When you get stuck google the problem and you will probably find a solution. You can check your results with SPSS or SAS.
Eventually you start to get the hang of it and jobs start going quicker. Referencing old code always helps. Hopefully you find some sense of pride in the progress you make.
Then as you become more advanced and read blogs plus this site you start to learn the true power of R, the tricks, and what all is possible with it.
A few pointers:
Plenty of good advice here, but I think the single most helpful thing you could do would be to just sit down with someone who knows R for a couple of hours. I probably took years off my life learning R alone; just having someone to say, "Nah, it's much easier to do it this way" would have saved me so much grief. I think this is especially crucial with regard to learning to do R things, rather than SPSS things in R, as StasK mentions, but it will also stop you from spending hours chasing around stupid little syntax errors.
It doesn't look like Pittsburgh has an R User Group, which baffles me, but there must be many Rgonauts in the vicinity. Try to find them. Bribe someone to just hang out with you while you work through anything described above - translating an old project into R sounds especially good.
This book might be right down your alley: R. Muenchen (2008). R for SAS and SPSS Users.
I've had very similar experiences starting R several times. I am a Stata user though. Muenchen and Hilbe (a lo-ong time editor in charge of statistical software section of The American Statistician) have a similar book R for Stata users, and I found it entertaining at times, when they provide a 20-line segment of code for something that is doable in three lines in Stata. (On the other hand, there are of course situations when you just simply cannot do an object-oriented thing meaningfully in Stata.) I guess the message is, you should abstract from your SPSS and SAS experience, as R thinks in totally different terms about nearly everything. Your prior experience will likely be more of a hindrance, at least in the case of R (you can probably relearn from SPSS to Stata quite quickly if you had to). There are no more rectangular data sets, and there are no CARDS to read from. You would need to eventually learn to do R things, rather than trying to do SPSS things in R.
I've been in your shoes - indeed am probably still in your shoes - as I use both R and SAS regularly for different tasks. As mentioned above, there's "R for SAS Users", and you might also want to consider looking at the "SAS and R" blog: http://sas-and-r.blogspot.com/ and the accompanying book, which provides worked examples in both SAS and R.
Generally speaking, the experience in switching between SAS and R is somewhat disorienting, because they're different philosophically. At its core, SAS isn't a programming language - it's a powerful command line interface. R...is a programming language. R made more sense to me when I started learning Python and C than when I knew SAS. Admittedly its a programming language built for statistics, but there you have it.
While the approach of forcing yourself to fire up R instead of SAS is a decent one, I would suggest something else when you first start out, as plunging feet first into new project and new software is scary as hell. Repeat an old analysis. Take a paper you've written, a problem set you've done, whatever in SAS (or SPSS) and repeat it in R. Step by step, Googling and asking questions here as you go. This has three advantages:
I agree with @Matt Parker that there is plenty of good advice. One thing I want to stress in my answer is that it's vital to understand basic programming if you want to work with R.
My favourite site for learning new things is Khan Academy that has some videos on Python scripting that is very similar to R and there is actually a plugin that allows you to use Python in SPSS that you can find here. I've used the Python plugin a lot doing complex merges, counting occurences, creating custom tables etc. It's a very good way to get started with programming.
I know several different programming languages and the thing that makes R special is it's vectors/matrices and it's graphical output. I recommend learning the different ways of manipulating vectors because they're the basis of dataframes and most of the data that you will use, here's a good tutorial. When it comes to the graphical output there are good functions for most of the available graphs and you probably don't need to worry about this part.
Another fundamental part of R is the install.packages("my_package_name") function that makes fetching new components and installing them hassle free - something that a lot of other languages make considerable harder.
My favourit R site is Quick-R and I would suggest on trying out some of their code. Once you've gotten the same graph try to change colors, number of columns, xlabel etc. There are also plenty of R-tutorials on YouTube that probably can help you get started.
An excellent way to learn R is to try to understand how different functions work. Write the functions name (without parenthesis), press enter and you get the code - look at it's code and try to understand what it does. The debug() function can also be of help when trying to understand how stuff works.
Yes, you can choose to use R in a SPSS similar environment:
install.packages("Rcmdr")
library(Rcmdr)
I've also worked some with SAS that is a very unintuitive language that differs a lot from all other programming languages and unfortunately you'll probably have very little that you can use from your SAS experience when your work with R. That said, R is much easier that SAS ;-)
It is nice to have a good environment to work with when you use R, my recommendation to beginners is RStudio.
Good luck!
I think the answer mentioned by @Glen is very imporntant however you do need some books to start with.
With regards to R I believe you need 3 books.
First, for doing statistics with R i can recommend you R in Action . Robert maintains a very active R site and blog (http://www.statmethods.net/) and his book and efforts are fantastic.
Second, you may need a book for programming in R, as R is not only a statistics program but also a mighty language. Programming is very helpful when doing complex analyses or when combining analysis, or for writing functions that perform the same thing on different datasets. I can only recommend you The Art of R Programming . No major statistics are presented here, but you will get a grip how to combine, connect and automate your analyses.
Third, you will need a reference book, an encyclopedia. I can recommend you The R Book . This is not the book you will read from start to finish but its the book you open now and then to see if some things are possible, if there are other ways to analyse data etc.
And most important stop using anything else and try to tackle all your problems in R. Solving problems in the best way to learn.
Also, before I forget. There are some wonderful blogs from some fantastic people writing about all sort of stuff one can do in R. Search and you will find. Highly recommended is the aggregation site http://www.r-bloggers.com/ where R relevant blogs are gathered.
Have fun!
If I could add two item to the many good suggestions here already;
1)Find an R group. I know in the Boston area there is a fairly strong R group. It is sponsored by RStudio, which by the way is one of the BEST IDE around.
Go on Meetup or Google group or RSeek.org to search them out.
2)One more thing, I found learning R on my own a steep climb but my general advice is keep looking for books that help AND DON'T STOP until you find the right one.
MarketingEngineer:
I know your issues as the best & worst thing of R is too functional until we don't know where to start with.
First, you need to know what's purpose you learn R. If you're just for learning a new language then, I think SAS and R Blog might be useful, as a SAS/SPSS user.
However, R is not that hard if compared to SAS or SPSS, it's just looked complex due to the ever increasing packages and functions. So, I suggest you can learn from scratch using any manuals or webs suggested, such as Quick-R, by the author of R in Action. Note: R in Action is a good book to start with.
What if, you used R for specific purposes, then it's better you have a look of the R Book list at R Project Web. There are 129 R and S related books in specific applications, such as Econometric, Graphical, Modelling, ... so on.
Recently, I'm thinking of Interactive R Language Online Learning Platform and I had asked for feedback here too. It's open source (not yet released) project. I had started making a working prototype with 3 R Language basic lessons. You can give it a try.
Hope it help :-)
Some Helpful R Links from the Dallas R Users Group
http://www.meetup.com/Dallas-R-Users-Group/pages/R_Helpful_Links/
There's a free early version of R for SAS and SPSS Users at http://r4stats.com. That site also has many of the book examples now displayed as web pages. If you have access to a university library, they usually have all the Springer R books online for free.