Jump to content
The Corroboree
Sign in to follow this  
Stillman

Anyone ever used program called R for statistics

Recommended Posts

I'm doing a computer lab with R I guess its like a dos style graph builder. I don't understand it whatsoever, anyone got a link to a tute or an idea of how its used?

Share this post


Link to post
Share on other sites

I love R, its the bees' knees. but incredibly steep learning curve.

best way to learn to use it is to cut and paste scripts, and start developing your own small library you can reuse.

There are an incredible amount of scripts out there you can reuse, just google what your looking for. should be plenty of short tutorials out there that you can use, and perhaps best to use a few.

Start by using the R websites FAQ, and then google others.

If you havent done any programming before it would be pretty daunting, but one it starts falling into place for you, you'll love it.

Cheers, Ob.

  • Like 1

Share this post


Link to post
Share on other sites

yeah they have us cutting and pasting and adding script, The comp tute guy doesn't seem to know how to use it which makes me nervous. ANd yeah never done programming so its like trying to type a novel without knowing the alphabet at the moment.

Share this post


Link to post
Share on other sites

I use it in conjection with excel, keep all my datasets in .csv files. I primarily use it just for analysis for statistical significance, for F or P values.

but when i want to graph out the same data, i just google a nice down to earth script (the example ones from the built in FAQ (also on thier site i think) are brilliant)

I think like a lot of things practise makes perfect, and also a lot of screwing around with the scripts themselves helps to expand your understanding.

Cheers, Ob.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks man will do a bit of digging.

Share this post


Link to post
Share on other sites

My advice:

**Always break the problem into stages, or chunks - and keep breaking the chunks into smaller chunks. Maybe something like (this is just a general example - not R code):

A] Data input (read from file)

B] Data sorting (place into a data structure)

C] Data analysis (run the various statistics)

D] Display results

then

A1] Check if the file is there

A2] Attempt to open the file

A3] Read the file into a vector of strings

A4] Close the file

So the idea is to break everything up - as the first thing you always do. This is arguably the most basic and fundamental job of a programmer - breaking a problem into discrete chunks.

**Google your questions to find out how other people did it (on good coding days, I might read anywhere from 30-100 webpages - not cover-to-cover, but to find what I need). Often people have encountered and solved your exact problem before. Now the only way this works, is if you ask google something specific, i.e. "How do I reverse a vector?", as opposed to "How do I programme a mars rover?"
It's actually a skill to be able to find help. More often than not, if you don't find anything - it's because you're not wording your question probably, than it not being encountered. This ties in with the first tip - if you don't chunk things down, you won't be able to ask for help (as the less specific your problem, the less help you will find).

**Work out your code flow on paper, hand-working trivial examples, searching for counter-examples and difficult cases are brilliant techniques that will help you in the long run. It's easy to make code that works most of the time - but much more difficult to make code that works all the time, and isn't a mess.

**When you're programming - keep regular backups of working scripts, and make and test changes incrementally. You're going to find huge trouble if you code big sections without testing them piece-by-piece.

**Most important of all.... PRACTICE, and don't be afraid of repeated failures - the more you fail, the less ways there are to fail next time (assuming you learn from your mistakes).

:)

Edited by CβL
  • Like 2

Share this post


Link to post
Share on other sites

Ob, I might have to corner you some time and see if you can push me up the R learning curve. It's one of the most popular programs in my field, but I've avoided it because I'm a non-scripter, and Minitab, SPSS etc almost always came up with the goods.

I have a few nuts though that I think R would crack, so maybe it's time for me to jump into the deep end...

Share this post


Link to post
Share on other sites

Heard that it is extremely powerful from a few academics but I'd imagine it would be a hard one to master without any background in coding, but not as hard as say Python would be to use for stats from a non-scripting background.
Unless you have a strong mathematical + programming background, or have a real desire to spend many hours teaching yourself, I'd be asking yourself what I want to achieve by using it and then if it can be much more easily done by more conventional stats software stick to that.

Share this post


Link to post
Share on other sites

If its the same as r-plus (?). I know your pain - I used it at uni for some things , so memorable I can't remember what those things were. All I do remember is that it was a pain in the ass. Good luck.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×