Understanding R basics

So how R works.

I hope by this time you have installed R. I am running R under windows vista ultimate. So many things I here will refer to windows operating environment.

R Interface

image

When you start R, it shows you the version and licence information in editor window.

R is a command line software. so, every line starts with >

> y<-rnorm(50)




When a statement is incomplete it gives + sign





> xy<-read.table("control_vs_inocul.txt", 


+ header=T,


+ na.string=".")



is same as



> xy<-read.table("control_vs_inocul.txt", header=T, na.string=".")




R is case sensitive





> Var<-20


> VAR<-30


> var<-40




here Var, VAR and var correspond to different variables.



commenting





# this is a comment




Till now, I have not found multiple commenting system.



Changing Root directory



Go to File>Change Dir..



Installing and Loading packages



Go to Packages>Install Package(s).



Go to Packages>Install Package  or





> library (packagename)




Getting help





> help.start() # to get general help, opens in web browser


> help(fun) # help on specific function


> ?fun # same as help(fun)


> help.search("comment") # searches for items containg "comment"


> RSiteSearch("comment") # searches in R site for term comment




It's all for now...........

Some useful R packages

Before we start, lets have a look at some useful R packages. you can find all packages at http://cran.r-project.org/web/packages/. It depends on the necessity of the user, but still some are useful for all. some of them are

This can be extended to a long list but for now............its all........

So, What is R actually??

R is an open source statistical software. ( actually not...."Many users think of R as a statistics system. We prefer to think of it of an environment within which statistical techniques are implemented"- the R project). In this blog, I am discussing it as statistical software.

It is basically based on command language interface (not Point and Click). although it has some basic GUI and a GUI package called R commander.

This is based on S language. S plus is commercial version and R is open source (GNU). R is very powerful software because of its flexibility. You can get almost what you want as you can parameterize the functions yourself. This is very good in graphics.

Where it runs?

It runs in Unix/ Linux based computers, windows and Mac.

Where to get it?

You can get the software from various mirror sites going through http://www.r-project.org/.

It will come with some built in functions and you can always add some packages according to your requirements.